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

Add week to UnwrapDateTruncInComparison #21408

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jinyangli34
Copy link
Contributor

Description

Allow date_trunc optimization for week unit
Add unit tests

Additional context and related issues

Release notes

(X) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

# Section
* Fix some things. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label Apr 5, 2024
Arguments.of("year", "<=", "2024-12-31", "<=", "2024-12-31"));
}

@ParameterizedTest
Copy link
Member

Choose a reason for hiding this comment

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

Avoid using ParameterizedTest. See how other similar tests are structured

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to helper + one test a line. PTAL


@ParameterizedTest
@MethodSource("compareParams")
public void testDateCompareGreaterThanOrEquals(String unit, String compareOp, String target, String expectedOp, String limit)
Copy link
Member

Choose a reason for hiding this comment

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

Avoid abbreviations (e.g., expectedOp -> expectedOperator)

@jinyangli34 jinyangli34 force-pushed the jinyang-add_week_for_date_trunc_unwrap branch from 4bbbb07 to edcb9fc Compare April 5, 2024 02:57
Copy link

This pull request has gone a while without any activity. Tagging the Trino developer relations team: @bitsondatadev @colebow @mosabua

@github-actions github-actions bot added the stale label Apr 26, 2024
@mosabua mosabua added the stale-ignore Use this label on PRs that should be ignored by the stale bot so they are not flagged or closed. label Apr 26, 2024
@jinyangli34 jinyangli34 force-pushed the jinyang-add_week_for_date_trunc_unwrap branch from edcb9fc to 8165c64 Compare May 7, 2024 04:33
@findepi
Copy link
Member

findepi commented May 10, 2024

@ebyhr independently we may want to update UtcConstraintExtractor too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed stale stale-ignore Use this label on PRs that should be ignored by the stale bot so they are not flagged or closed.
Development

Successfully merging this pull request may close these issues.

4 participants