mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Fix test
This commit is contained in:
parent
bddf1cc312
commit
2faa23112c
@ -736,6 +736,7 @@ inline ReturnType readDateTextImpl(ExtendedDayNum & date, ReadBuffer & buf)
|
||||
readDateTextImpl<ReturnType>(local_date, buf);
|
||||
else if (!readDateTextImpl<ReturnType>(local_date, buf))
|
||||
return false;
|
||||
|
||||
/// When the parameter is out of rule or out of range, Date32 uses 1925-01-01 as the default value (-DateLUT::instance().getDayNumOffsetEpoch(), -16436) and Date uses 1970-01-01.
|
||||
date = DateLUT::instance().makeDayNum(local_date.year(), local_date.month(), local_date.day(), -static_cast<Int32>(DateLUT::instance().getDayNumOffsetEpoch()));
|
||||
return ReturnType(true);
|
||||
|
@ -1,13 +1,13 @@
|
||||
CREATE TEMPORARY TABLE test (`i` Int64, `d` DateTime);
|
||||
INSERT INTO test FORMAT JSONEachRow {"i": 123, "d": "2022-05-03"};
|
||||
INSERT INTO test FORMAT JSONEachRow {"i": 456, "d": "2022-05-03 01:02:03"};
|
||||
SELECT * FROM test;
|
||||
SELECT * FROM test ORDER BY i;
|
||||
|
||||
DROP TABLE test;
|
||||
|
||||
CREATE TEMPORARY TABLE test (`i` Int64, `d` DateTime64);
|
||||
INSERT INTO test FORMAT JSONEachRow {"i": 123, "d": "2022-05-03"};
|
||||
INSERT INTO test FORMAT JSONEachRow {"i": 456, "d": "2022-05-03 01:02:03"};
|
||||
SELECT * FROM test;
|
||||
SELECT * FROM test ORDER BY i;
|
||||
|
||||
DROP TABLE test;
|
||||
|
Loading…
Reference in New Issue
Block a user