Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
- 19000:9000
- 18123:8123
fq-connector-go:
image: ghcr.io/ydb-platform/fq-connector-go:v0.0.6-rc.8@sha256:74ebae0530d916c1842a7fddfbddc6c018763a0401f2f627a44e8829692fe41f
image: ghcr.io/ydb-platform/fq-connector-go:v0.1.1@sha256:47e24df143aee31a83d4a4cd0acc20b4cab8c03a9c63e81a6e99cb017a31f916
ports:
- 50051:50051
network_mode: host
Original file line number Diff line number Diff line change
Expand Up @@ -88,31 +88,31 @@ def _make_test_clickhouse(self) -> TestCase:
'1950-01-10',
'1850-01-10',
'1950-01-10 12:23:45',
'1850-01-10 12:23:45.678',
'1850-01-10 12:23:45.678910',
],
# Value is OK for CH, but can be too early for YQL
[
2,
'1970-01-10',
'1950-01-10',
'1980-01-10 12:23:45',
'1950-01-10 12:23:45.678',
'1950-01-10 12:23:45.678910',
],
# Value is OK for both CH and YQL
[
3,
'2004-01-10',
'2004-01-10',
'2004-01-10 12:23:45',
'2004-01-10 12:23:45.678',
'2004-01-10 12:23:45.678910',
],
# Value is OK for CH, but too late for YQL
[
4,
'2110-01-10',
'2110-01-10',
'2106-01-10 12:23:45',
'2110-01-10 12:23:45.678',
'2110-01-10 12:23:45.678910',
],
# Value is too late for both OK for CH
# In this case ClickHouse behaviour is undefined
Expand All @@ -123,7 +123,7 @@ def _make_test_clickhouse(self) -> TestCase:
'2150-01-10',
'2300-01-10',
'2107-01-10 12:23:45',
'2300-01-10 12:23:45.678',
'2300-01-10 12:23:45.678910',
],
]

Expand All @@ -141,7 +141,7 @@ def _make_test_clickhouse(self) -> TestCase:
datetime.date(2004, 1, 10),
datetime.date(2004, 1, 10),
datetime.datetime(2004, 1, 10, 12, 23, 45),
datetime.datetime(2004, 1, 10, 12, 23, 45, 678000),
datetime.datetime(2004, 1, 10, 12, 23, 45, 678910),
],
[
4,
Expand Down Expand Up @@ -194,14 +194,14 @@ def _make_test_postgresql(self) -> TestCase:
# Date is OK for CH, but too early for YQL
[
1,
datetime.datetime(1950, 5, 27, 12, 23, 45, 678000),
datetime.datetime(1950, 5, 27, 12, 23, 45, 678910),
],
# Date is OK for both CH and YQL
[2, datetime.datetime(1988, 11, 20, 12, 23, 45, 678000)],
[2, datetime.datetime(1988, 11, 20, 12, 23, 45, 678910)],
# Date is OK for CH, but too late for YQL
[
3,
datetime.datetime(2108, 1, 1, 12, 23, 45, 678000),
datetime.datetime(2108, 1, 1, 12, 23, 45, 678910),
],
]

Expand All @@ -213,7 +213,7 @@ def _make_test_postgresql(self) -> TestCase:
[
2,
# datetime.datetime(1988, 11, 20, 12, 23, 45, 678000).astimezone(ZoneInfo('UTC')).replace(tzinfo=None),
datetime.datetime(1988, 11, 20, 12, 23, 45, 678000),
datetime.datetime(1988, 11, 20, 12, 23, 45, 678910),
],
[
3,
Expand Down Expand Up @@ -277,31 +277,31 @@ def _make_test_string_clickhouse(self) -> TestCase:
'1950-01-10',
'1850-01-10',
'1950-01-10 12:23:45',
'1850-01-10 12:23:45.678',
'1850-01-10 12:23:45.678910',
],
# Value is OK for CH, but can be too early for YQL
[
2,
'1970-01-10',
'1950-01-10',
'1980-01-10 12:23:45',
'1950-01-10 12:23:45.678',
'1950-01-10 12:23:45.678910',
],
# Value is OK for both CH and YQL
[
3,
'2004-01-10',
'2004-01-10',
'2004-01-10 12:23:45',
'2004-01-10 12:23:45.678',
'2004-01-10 12:23:45.678910',
],
# Value is OK for CH, but too late for YQL
[
4,
'2110-01-10',
'2110-01-10',
'2106-01-10 12:23:45',
'2110-01-10 12:23:45.678',
'2110-01-10 12:23:45.678910',
],
# Value is too late for both OK for CH
# In this case ClickHouse behaviour is undefined
Expand All @@ -312,21 +312,21 @@ def _make_test_string_clickhouse(self) -> TestCase:
'2150-01-10',
'2300-01-10',
'2107-01-10 12:23:45',
'2300-01-10 12:23:45.678',
'2300-01-10 12:23:45.678910',
],
]

data_out = [
[1, '1970-01-01', '1900-01-01', '1970-01-01T00:00:00Z', '1900-01-01T12:23:45.678Z'],
[2, '1970-01-10', '1950-01-10', '1980-01-10T12:23:45Z', '1950-01-10T12:23:45.678Z'],
[3, '2004-01-10', '2004-01-10', '2004-01-10T12:23:45Z', '2004-01-10T12:23:45.678Z'],
[4, '2110-01-10', '2110-01-10', '2106-01-10T12:23:45Z', '2110-01-10T12:23:45.678Z'],
[1, '1970-01-01', '1900-01-01', '1970-01-01T00:00:00Z', '1900-01-01T12:23:45.67891Z'],
[2, '1970-01-10', '1950-01-10', '1980-01-10T12:23:45Z', '1950-01-10T12:23:45.67891Z'],
[3, '2004-01-10', '2004-01-10', '2004-01-10T12:23:45Z', '2004-01-10T12:23:45.67891Z'],
[4, '2110-01-10', '2110-01-10', '2106-01-10T12:23:45Z', '2110-01-10T12:23:45.67891Z'],
[
5,
'2149-06-06',
'2299-12-31',
'1970-12-04T05:55:29Z',
'1900-01-01T00:00:00.000Z', # TODO: strange overflow under bottom bound for datetime64
'1900-01-01T00:00:00Z', # TODO: strange overflow under bottom bound for datetime64
],
]

Expand Down Expand Up @@ -364,27 +364,27 @@ def _make_test_string_postgresql(self) -> TestCase:
data_in = [
[
1,
datetime.datetime(1950, 5, 27, 12, 23, 45, 678000),
datetime.datetime(1950, 5, 27, 12, 23, 45, 678910),
],
[2, datetime.datetime(1988, 11, 20, 12, 23, 45, 678000)],
[2, datetime.datetime(1988, 11, 20, 12, 23, 45, 678910)],
[
3,
datetime.datetime(2108, 1, 1, 12, 23, 45, 678000),
datetime.datetime(2108, 1, 1, 12, 23, 45, 678910),
],
]

data_out = [
[
1,
'1950-05-27T12:23:45.678Z',
'1950-05-27T12:23:45.67891Z',
],
[
2,
'1988-11-20T12:23:45.678Z',
'1988-11-20T12:23:45.67891Z',
],
[
3,
'2108-01-01T12:23:45.678Z',
'2108-01-01T12:23:45.67891Z',
],
]

Expand Down