-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Support unwrap date to timestamp with time zone #14945
Conversation
core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/UnwrapCastInComparison.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/UnwrapCastInComparison.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/UnwrapCastInComparison.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/UnwrapCastInComparison.java
Show resolved
Hide resolved
testUnwrap(session, inputType, "NULL", inputPredicate, expectedPredicate); | ||
} | ||
|
||
private void testUnwrap(Session session, String inputType, String inputValue, String inputPredicate, String expectedPredicate) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the UnwrapCast perspective, does the inputValue, part of VALUES, matter?
(if it does, we should stop using VALUES for this test, we would need a temporary table)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the input value affects it. I left TODO comment as it's a pre-existing issue and the change seems not simple.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i want to understand that. Do you know what happens here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I was doing something wrong. I reconfirmed the input value doesn't affect it. Removed a new testUnwrap
core/trino-main/src/test/java/io/trino/sql/query/TestUnwrapCastInComparison.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/test/java/io/trino/sql/query/TestUnwrapCastInComparison.java
Outdated
Show resolved
Hide resolved
855c346
to
be81989
Compare
Addressed comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except open be81989#r1021802073.
(Ideally, there is no new testUnwrap
overload.)
testUnwrap(session, inputType, "NULL", inputPredicate, expectedPredicate); | ||
} | ||
|
||
private void testUnwrap(Session session, String inputType, String inputValue, String inputPredicate, String expectedPredicate) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i want to understand that. Do you know what happens here?
be81989
to
f693a17
Compare
Thanks. LGTM |
Description
Fixes #5798
Release notes
( ) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
(x) Release notes are required, with the following suggested text: