You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
We hit a regression in Dask SQL after upgrading to 13.0.0-rc1 (dask-contrib/dask-sql#844).
Example query:
SELECT col_int32 FROM test
WHERE col_int32 > (
SELECTAVG(col_int32) FROM test
WHERE col_utf8 BETWEEN '2002-05-08'AND (cast('2002-05-08'asdate) + interval '5 days')
)
Expected Filter
Filter: test.col_utf8 BETWEEN Utf8("2002-05-08") AND Utf8("2002-05-13")
Actual Filter
Filter: test.col_utf8 BETWEEN Utf8("2002-05-08") AND CAST(CAST(Utf8("2002-05-08") AS Date32) + IntervalDayTime("21474836480") AS Utf8)
To Reproduce
Here is a repro for the optimizer integration-test.rs:
#[test]fnsubquery_filter_with_cast() -> Result<()>{let sql = "SELECT col_int32 FROM test \ WHERE col_int32 > (\ SELECT AVG(col_int32) FROM test \ WHERE col_utf8 BETWEEN '2002-05-08' \ AND (cast('2002-05-08' as date) + interval '5 days')\ )";let plan = test_sql(sql)?;let expected =
"Projection: test.col_int32\n Filter: CAST(test.col_int32 AS Float64) > __sq_1.__value\\n CrossJoin:\n TableScan: test projection=[col_int32]\\n Projection: AVG(test.col_int32) AS __value, alias=__sq_1\\n Aggregate: groupBy=[[]], aggr=[[AVG(test.col_int32)]]\\n Filter: test.col_utf8 BETWEEN Utf8(\"2002-05-08\") AND Utf8(\"2002-05-13\")\\n TableScan: test projection=[col_int32, col_utf8]";assert_eq!(expected, format!("{:?}", plan));Ok(())}
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
We hit a regression in Dask SQL after upgrading to 13.0.0-rc1 (dask-contrib/dask-sql#844).
Example query:
Expected Filter
Actual Filter
To Reproduce
Here is a repro for the optimizer integration-test.rs:
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: