-
Notifications
You must be signed in to change notification settings - Fork 1.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
Add optimizer test for simplifying predicates on timestamps #3939
Conversation
@@ -87,11 +88,11 @@ fn case_when_aggregate() -> Result<()> { | |||
|
|||
#[test] | |||
fn unsigned_target_type() -> Result<()> { | |||
let sql = "SELECT * FROM test WHERE col_uint32 > 0"; | |||
let sql = "SELECT col_utf8 FROM test WHERE col_uint32 > 0"; |
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.
As I added some columns to the test data I changed these plans so they selected specific columns rather than SELECT *
so they didn't diff when the schema changed
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.
clever 🤣
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.
"lazy" would also be a good description :)
cf1d14b
to
cf094e3
Compare
// a scan should have the now()... predicate folded to a single | ||
// constant and compared to the column without a cast so it can be | ||
// pushed down / pruned | ||
let expected = "Projection: test.col_int32\n Filter: test.col_ts_nano_utc < TimestampNanosecond(1666612093000000000, Some(\"UTC\"))\ |
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.
this test -- with UTC
timezone, works well (it is pretty cool to see it doing the right thing)
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.
Thanks @alamb. Let's merge!
Benchmark runs are scheduled for baseline = b5c23c2 and contender = e1f866e. e1f866e is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Add test for #3938