mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 10:02:01 +00:00
format
This commit is contained in:
parent
864ba06029
commit
93415789d7
@ -192,11 +192,11 @@ Field convertFieldToTypeImpl(const Field & src, const IDataType & type, const ID
|
||||
{
|
||||
return static_cast<const DataTypeDateTime &>(type).getTimeZone().fromDayNum(DayNum(src.get<Int32>()));
|
||||
}
|
||||
else if(which_type.isDateTime64() && which_from_type.isDate()) {
|
||||
else if (which_type.isDateTime64() && which_from_type.isDate()) {
|
||||
const auto value = static_cast<const DataTypeDateTime64 &>(type).getTimeZone().fromDayNum(DayNum(src.get<UInt64>()));
|
||||
return DecimalUtils::decimalFromComponentsWithMultiplier<DateTime64>(value, 0, 1);
|
||||
}
|
||||
else if(which_type.isDateTime64() && which_from_type.isDate32()) {
|
||||
else if (which_type.isDateTime64() && which_from_type.isDate32()) {
|
||||
const auto value = static_cast<const DataTypeDateTime64 &>(type).getTimeZone().fromDayNum(DayNum(src.get<Int32>()));
|
||||
return DecimalUtils::decimalFromComponentsWithMultiplier<DateTime64>(value, 0, 1);
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ DROP TABLE IF EXISTS datetime64_index_tbl;
|
||||
CREATE TABLE datetime64_index_tbl(ts DateTime64(3, 'UTC')) ENGINE=MergeTree ORDER BY ts;
|
||||
INSERT INTO datetime64_index_tbl(ts) VALUES(toDateTime64('2023-05-27 00:00:00', 3, 'UTC'));
|
||||
|
||||
SELECT ts from datetime64_index_tbl where ts < toDate('2023-05-28');
|
||||
SELECT ts from datetime64_index_tbl where ts < toDate32('2023-05-28');
|
||||
SELECT ts FROM datetime64_index_tbl WHERE ts < toDate('2023-05-28');
|
||||
SELECT ts FROM datetime64_index_tbl WHERE ts < toDate32('2023-05-28');
|
||||
|
||||
DROP TABLE datetime64_index_tbl;
|
||||
|
Loading…
Reference in New Issue
Block a user