Skip to content

Implementation of makeDate and makeDate32#35628

Merged
davenger merged 2 commits intomasterfrom
make_date
Mar 29, 2022
Merged

Implementation of makeDate and makeDate32#35628
davenger merged 2 commits intomasterfrom
make_date

Conversation

@davenger
Copy link
Copy Markdown
Member

@davenger davenger commented Mar 25, 2022

Changelog category (leave one):

  • New Feature

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Added functions makeDate(year, month, day), makeDate32(year, month, day)

Information about CI checks: https://clickhouse.tech/docs/en/development/continuous-integration/

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 25, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
Member

@alesapin alesapin left a comment

Choose a reason for hiding this comment

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

Actually I'm not sure that we have to support all data types as arguments... Maybe leave only integers Everything will be faster and simpler :)

if (converted_argument_type->equals(*argument_type))
converted_arguments.push_back(argument_column);
else if (isNumber(argument_type))
converted_arguments.push_back(convert_to_number_func.executeImpl(
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.

Not the most effective way, but for such function it shouldn't be a problem at all.

Copy link
Copy Markdown
Member Author

@davenger davenger Mar 28, 2022

Choose a reason for hiding this comment

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

replaced my custom conversion logic to castColumn() that is used in other similar cases

@alesapin
Copy link
Copy Markdown
Member

Let's add it to category "New feature" and add Changelog entry.

@alesapin alesapin changed the title WIP Implementation of makeDate and makeDate32 Implementation of makeDate and makeDate32 Mar 29, 2022
@davenger davenger merged commit bf376ee into master Mar 29, 2022
@davenger davenger deleted the make_date branch March 29, 2022 11:35
rschu1ze added a commit that referenced this pull request Apr 26, 2023
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.

Functions makeDate, makeDateTime, YYYYMMDDToDate, changeYear and similar.

3 participants