Skip to content

Decimal improvements#3047

Merged
alexey-milovidov merged 8 commits intoClickHouse:masterfrom
4ertus2:decimal
Sep 6, 2018
Merged

Decimal improvements#3047
alexey-milovidov merged 8 commits intoClickHouse:masterfrom
4ertus2:decimal

Conversation

@4ertus2
Copy link
Copy Markdown
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

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
Copy Markdown
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 isUnsignedInteger() const override { return false; }
bool canBeUsedInBooleanContext() const override { return true; }
bool isNumber() const override { return true; }
bool isInteger() const override { return false; }
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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