Skip to content
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

Merged
merged 8 commits into from
Sep 6, 2018
Merged

Decimal improvements #3047

merged 8 commits into from
Sep 6, 2018

Conversation

4ertus2
Copy link
Contributor

@4ertus2 4ertus2 commented Sep 5, 2018

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

@@ -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; }
Copy link
Member

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; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not?

Copy link
Contributor Author

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; }
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@alexey-milovidov alexey-milovidov merged commit 5057b15 into ClickHouse:master Sep 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants