Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ydb/tests/olap/s3_import/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ def _get_ydb_config(cls):
config = KikimrConfigGenerator(
extra_feature_flags={
"enable_external_data_sources": True,
"enable_move_column_table": True
"enable_move_column_table": True,
"enable_columnshard_bool": True,
},
query_service_config={"available_external_data_sources": ["ObjectStorage"]},
table_service_config={}
Expand Down
43 changes: 26 additions & 17 deletions ydb/tests/olap/s3_import/test_types_and_formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ def test_different_types_and_formats(self, format, compression):
c_json Json,
c_date Date,
c_datetime Datetime,
c_timestamp Timestamp
c_timestamp Timestamp,
c_bool Bool
"""

self.ydb_client.query(f"""
Expand All @@ -85,10 +86,14 @@ def test_different_types_and_formats(self, format, compression):

self.ydb_client.query(f"""
UPSERT INTO {olap_table_name} (
c_int8, c_int16, c_int32, c_int64, c_uint8, c_uint16, c_uint32, c_uint64, c_float, c_double, c_string, c_utf8, c_json, c_date, c_datetime, c_timestamp
c_int8, c_int16, c_int32, c_int64, c_uint8, c_uint16, c_uint32, c_uint64,
c_float, c_double, c_string, c_utf8, c_json, c_date, c_datetime, c_timestamp, c_bool
) VALUES
(1, 1, 1, 1, 1, 1, 1, 1, Float("0.5"), Double("-0.5"), "hello", "world", Json("[10, 20, 30]"), Date("2025-08-25"), Datetime("2025-08-25T10:00:00Z"), Timestamp("2025-08-25T10:00:00Z")),
(NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
(1, 1, 1, 1, 1, 1, 1, 1, Float("0.5"), Double("-0.5"), "hello", "world",
Json("[10, 20, 30]"), Date("2025-08-25"), Datetime("2025-08-25T10:00:00Z"),
Timestamp("2025-08-25T10:00:00Z"), true),
(NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, false);
""")

test_bucket = f"{format}_{compression}_bucket"
Expand Down Expand Up @@ -136,10 +141,10 @@ def test_different_types_and_formats(self, format, compression):

@link_test_case("#18784")
def test_parquet_format(self):
olap_table_name = "olap_table"
s3_source_name = "s3_source"
s3_table_name = "s3_table"
from_s3_table_name = "from_s3"
olap_table_name = "olap_table_parquet"
s3_source_name = "s3_source_parquet"
s3_table_name = "s3_table_parquet"
from_s3_table_name = "from_s3_parquet"

table_schema = """
c_int8 Int8,
Expand All @@ -161,7 +166,8 @@ def test_parquet_format(self):
c_datetime64 Datetime64,
c_timestamp Timestamp,
c_timestamp64 Timestamp64,
c_decimal Decimal(22, 9)
c_decimal Decimal(22, 9),
c_bool Bool
"""

self.ydb_client.query(f"""
Expand Down Expand Up @@ -194,7 +200,8 @@ def test_parquet_format(self):
c_datetime64,
c_timestamp,
c_timestamp64,
c_decimal
c_decimal,
c_bool
) VALUES
(
1,
Expand All @@ -216,7 +223,8 @@ def test_parquet_format(self):
Datetime64("2025-08-25T10:00:00Z"),
Timestamp("2025-08-25T10:00:00Z"),
Timestamp64("2025-08-25T10:00:00Z"),
CAST("12.34" AS Decimal(22, 9))
CAST("12.34" AS Decimal(22, 9)),
true
),
(
NULL,
Expand All @@ -238,7 +246,8 @@ def test_parquet_format(self):
NULL,
NULL,
NULL,
NULL
NULL,
false
)
""")

Expand Down Expand Up @@ -290,10 +299,10 @@ def test_parquet_format(self):

@link_test_case("#18784")
def test_parquet_datetime_types(self):
olap_table_name = "olap_table"
s3_source_name = "s3_source"
s3_table_name = "s3_table"
from_s3_table_name = "from_s3"
olap_table_name = "olap_table_datetime"
s3_source_name = "s3_source_datetime"
s3_table_name = "s3_table_datetime"
from_s3_table_name = "from_s3_datetime"

table_schema = """
c_int32 Int32 NOT NULL,
Expand Down Expand Up @@ -364,7 +373,7 @@ def test_parquet_datetime_types(self):
)
""")

test_bucket = "parquet_bucket"
test_bucket = "parquet_datetime_bucket"
self.s3_client.create_bucket(test_bucket)

access_key_id_secret_name = f"{test_bucket}_key_id"
Expand Down