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

GH-37608: [C++][Gandiva] TO_DATE function supports YYYY-MM and YYYY #37609

Merged
merged 1 commit into from
Sep 8, 2023
Merged

GH-37608: [C++][Gandiva] TO_DATE function supports YYYY-MM and YYYY #37609

merged 1 commit into from
Sep 8, 2023

Conversation

DenisTarasyuk
Copy link
Contributor

@DenisTarasyuk DenisTarasyuk commented Sep 7, 2023

Added fix for case when pattern does not contain day part

Rationale for this change

TO_DATE Gandiva function returns wrong result if used with pattern 'YYYY-MM' or 'YYYY'.

What changes are included in this PR?

Add a fix for case when tm_mday is zero to set it to 1

Are these changes tested?

Added tests that cover described cases

Are there any user-facing changes?

No

Added fix for case when pattern does not contain day part
@github-actions
Copy link

github-actions bot commented Sep 7, 2023

⚠️ GitHub issue #37608 has been automatically assigned in GitHub to PR creator.

@kou kou changed the title GH-37608: [C++] TO_DATE gandiva function returns wrong date for YYYY-MM pattern GH-37608: [C++][Gandiva] TO_DATE function returns wrong date for YYYY-MM pattern Sep 8, 2023
Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

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

+1

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting review Awaiting review labels Sep 8, 2023
@kou kou changed the title GH-37608: [C++][Gandiva] TO_DATE function returns wrong date for YYYY-MM pattern GH-37608: [C++][Gandiva] TO_DATE function accepts YYYY-MM and YYYY Sep 8, 2023
@kou kou changed the title GH-37608: [C++][Gandiva] TO_DATE function accepts YYYY-MM and YYYY GH-37608: [C++][Gandiva] TO_DATE function supports YYYY-MM and YYYY Sep 8, 2023
@kou kou merged commit a8a604c into apache:main Sep 8, 2023
36 of 37 checks passed
@kou kou removed the awaiting merge Awaiting merge label Sep 8, 2023
DenisTarasyuk added a commit to dremio/arrow that referenced this pull request Sep 8, 2023
…YYYY (apache#37609)

Added fix for case when pattern does not contain day part

### Rationale for this change

TO_DATE Gandiva function returns wrong result if used with pattern 'YYYY-MM' or 'YYYY'.

### What changes are included in this PR?

Add a fix for case when tm_mday is zero to set it to 1

### Are these changes tested?

Added tests that cover described cases

### Are there any user-facing changes?

No

* Closes: apache#37608

Authored-by: DenisTarasyuk <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
@conbench-apache-arrow
Copy link

After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit a8a604c.

There were 8 benchmark results indicating a performance regression:

The full Conbench report has more details. It also includes information about possible false positives for unstable benchmarks that are known to sometimes produce them.

DenisTarasyuk added a commit to dremio/arrow that referenced this pull request Sep 11, 2023
…YYYY (apache#37609) (#48)

Added fix for case when pattern does not contain day part

### Rationale for this change

TO_DATE Gandiva function returns wrong result if used with pattern 'YYYY-MM' or 'YYYY'.

### What changes are included in this PR?

Add a fix for case when tm_mday is zero to set it to 1

### Are these changes tested?

Added tests that cover described cases

### Are there any user-facing changes?

No

* Closes: apache#37608

Authored-by: DenisTarasyuk <[email protected]>

Signed-off-by: Sutou Kouhei <[email protected]>
DenisTarasyuk added a commit to dremio/arrow that referenced this pull request Sep 26, 2023
…YYYY (apache#37609)

Added fix for case when pattern does not contain day part

### Rationale for this change

TO_DATE Gandiva function returns wrong result if used with pattern 'YYYY-MM' or 'YYYY'.

### What changes are included in this PR?

Add a fix for case when tm_mday is zero to set it to 1

### Are these changes tested?

Added tests that cover described cases

### Are there any user-facing changes?

No

* Closes: apache#37608

Authored-by: DenisTarasyuk <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
DenisTarasyuk added a commit to dremio/arrow that referenced this pull request Oct 11, 2023
…YYYY (apache#37609) (#48)

Added fix for case when pattern does not contain day part

### Rationale for this change

TO_DATE Gandiva function returns wrong result if used with pattern 'YYYY-MM' or 'YYYY'.

### What changes are included in this PR?

Add a fix for case when tm_mday is zero to set it to 1

### Are these changes tested?

Added tests that cover described cases

### Are there any user-facing changes?

No

* Closes: apache#37608

Authored-by: DenisTarasyuk <[email protected]>

Signed-off-by: Sutou Kouhei <[email protected]>
xxlaykxx pushed a commit to dremio/arrow that referenced this pull request Oct 29, 2023
…YYYY (apache#37609) (#48)

Added fix for case when pattern does not contain day part

### Rationale for this change

TO_DATE Gandiva function returns wrong result if used with pattern 'YYYY-MM' or 'YYYY'.

### What changes are included in this PR?

Add a fix for case when tm_mday is zero to set it to 1

### Are these changes tested?

Added tests that cover described cases

### Are there any user-facing changes?

No

* Closes: apache#37608

Authored-by: DenisTarasyuk <[email protected]>

Signed-off-by: Sutou Kouhei <[email protected]>
DenisTarasyuk added a commit to dremio/arrow that referenced this pull request Nov 2, 2023
…YYYY (apache#37609) (#48)

Added fix for case when pattern does not contain day part

### Rationale for this change

TO_DATE Gandiva function returns wrong result if used with pattern 'YYYY-MM' or 'YYYY'.

### What changes are included in this PR?

Add a fix for case when tm_mday is zero to set it to 1

### Are these changes tested?

Added tests that cover described cases

### Are there any user-facing changes?

No

* Closes: apache#37608

Authored-by: DenisTarasyuk <[email protected]>

Signed-off-by: Sutou Kouhei <[email protected]>
loicalleyne pushed a commit to loicalleyne/arrow that referenced this pull request Nov 13, 2023
…YYYY (apache#37609)

Added fix for case when pattern does not contain day part

### Rationale for this change

TO_DATE Gandiva function returns wrong result if used with pattern 'YYYY-MM' or 'YYYY'.

### What changes are included in this PR?

Add a fix for case when tm_mday is zero to set it to 1

### Are these changes tested?

Added tests that cover described cases

### Are there any user-facing changes?

No

* Closes: apache#37608

Authored-by: DenisTarasyuk <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
dgreiss pushed a commit to dgreiss/arrow that referenced this pull request Feb 19, 2024
…YYYY (apache#37609)

Added fix for case when pattern does not contain day part

### Rationale for this change

TO_DATE Gandiva function returns wrong result if used with pattern 'YYYY-MM' or 'YYYY'.

### What changes are included in this PR?

Add a fix for case when tm_mday is zero to set it to 1

### Are these changes tested?

Added tests that cover described cases

### Are there any user-facing changes?

No

* Closes: apache#37608

Authored-by: DenisTarasyuk <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[C++][Gandiva] TO_DATE unction returns wrong date for pattern YYYY-MM
2 participants