-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Decimal improvements #3047
Decimal improvements #3047
Conversation
@@ -131,23 +131,14 @@ class DataTypeDecimal final : public DataTypeSimpleSerialization | |||
bool isParametric() const override { return true; } | |||
bool haveSubtypes() const override { return false; } | |||
bool shouldAlignRightInPrettyFormats() const override { return true; } | |||
bool textCanContainOnlyValidUTF8() const override { return true; } |
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.
I cannot find the replacement.
textCanContainOnlyValidUTF8 - that is true for decimal.
bool canBeUsedInBooleanContext() const override { return true; } | ||
bool isNumber() const override { return true; } | ||
bool isInteger() const override { return false; } |
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 not?
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.
Too much cases where isNumber() means something more then expected.
In example, when isNumber enabled it leads to compareAt() for Decimals with different scales in some cases.
|
||
bool isUUID() const { return idx == TypeIndex::UUID; } | ||
bool isArray() const { return idx == TypeIndex::Array; } | ||
bool isTuple() const { return idx == TypeIndex::Tuple; } |
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.
Now you have to replace typeid_casts, checkDataType across all the codebase.
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
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en