Skip to content

dictGet and dictGetOrDefault for Decimals - #5394

Merged
alexey-milovidov merged 9 commits into
ClickHouse:masterfrom
4ertus2:decimal
May 29, 2019
Merged

alexey-milovidov merged 9 commits into
ClickHouse:masterfrom
4ertus2:decimal

Conversation

@4ertus2

@4ertus2 4ertus2 commented May 23, 2019

Copy link
Copy Markdown
Contributor

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

Category (leave one):

  • New Feature

Short description (up to few sentences):
Implement dictGet and dictGetOrDefault functions for Decimal types. It extracts type arguments (precision and scale) from dictionary attributes described in XML.

Comment thread dbms/src/Core/Types.h

inline const char * getTypeName(TypeIndex idx)
{
switch (idx)

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.

BTW can be done with X macro.

break;
case AttributeUnderlyingType::Decimal64:
setAttributeValueImpl<Decimal64>(attribute, id, value.get<Decimal128>());
setAttributeValueImpl<Decimal64>(attribute, id, value.get<Decimal64>());

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.

A perfect case for PVS-Studio.

@alexey-milovidov

Copy link
Copy Markdown
Member

The only remaining is the integration test.

@alexey-milovidov alexey-milovidov left a comment

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.

.

@4ertus2
4ertus2 requested a review from alexey-milovidov May 27, 2019 16:44
@alexey-milovidov

Copy link
Copy Markdown
Member

clickhouse-test-server script is not used in CI.
It is @proller's own script.

@4ertus2 4ertus2 changed the title dictGet and dictGetOrDefault for Decimals [wip] dictGet and dictGetOrDefault for Decimals May 28, 2019
@alesapin

Copy link
Copy Markdown
Member

Temporary we can add this .xml files to docker images. After DDL for dictionaries will be merged we can write functional tests for dictionaries in simple way.

@4ertus2 4ertus2 changed the title [wip] dictGet and dictGetOrDefault for Decimals dictGet and dictGetOrDefault for Decimals May 29, 2019
@alexey-milovidov
alexey-milovidov merged commit 887c615 into ClickHouse:master May 29, 2019
@akuzm akuzm added the pr-feature Pull request with new product feature label May 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-feature Pull request with new product feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants