-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[flash-487] support compare and some cast functions #239
Conversation
|| (left_is_date = checkAndGetDataType<DataTypeDate>(arguments[0].get())) | ||
|| (left_is_date_time = checkAndGetDataType<DataTypeDateTime>(arguments[0].get())) | ||
|| (left_is_date = checkAndGetDataType<DataTypeDate>(arguments[0].get()) || checkAndGetDataType<DataTypeMyDate>(arguments[0].get())) | ||
|| (left_is_date_time = checkAndGetDataType<DataTypeDateTime>(arguments[0].get()) || checkAndGetDataType<DataTypeMyDateTime>(arguments[0].get())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clickhouse can not compare date and datetime since the internal representation is different, but since MyDate and MyDateTime use the same internal representation, we should allow compare them directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MyDate and MyDateTime can be comparable without any change 😃
@@ -1269,6 +1306,8 @@ using FunctionToFloat32 = FunctionConvert<DataTypeFloat32, NameToFloat32, Positi | |||
using FunctionToFloat64 = FunctionConvert<DataTypeFloat64, NameToFloat64, PositiveMonotonicity>; | |||
using FunctionToDate = FunctionConvert<DataTypeDate, NameToDate, ToIntMonotonicity<UInt16>>; | |||
using FunctionToDateTime = FunctionConvert<DataTypeDateTime, NameToDateTime, ToIntMonotonicity<UInt32>>; | |||
using FunctionToMyDate = FunctionConvert<DataTypeMyDate, NameToDate, ToIntMonotonicity<UInt16>>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why UInt16 for MyDate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my mistake
template <> struct FunctionTo<DataTypeDecimal32> { using Type = FunctionToDecimal<Decimal32>; }; | ||
template <> struct FunctionTo<DataTypeDecimal64> { using Type = FunctionToDecimal<Decimal64>; }; | ||
template <> struct FunctionTo<DataTypeDecimal128> { using Type = FunctionToDecimal<Decimal128>; }; | ||
template <> struct FunctionTo<DataTypeDecimal256> { using Type = FunctionToDecimal<Decimal256>; }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it's redundant.
./run-integration-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/rebuild |
./run-integration-tests |
1 similar comment
./run-integration-tests |
No description provided.