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
pub(crate)constQUERY2:&str = " -- Define the subquery WITH SubQuery AS ( SELECT a.column1, a.column2 AS ts_column, a.column3, SUM(a.column3) OVER ( PARTITION BY a.column1 ORDER BY a.column2 RANGE BETWEEN INTERVAL '10 minutes' PRECEDING AND CURRENT ROW ) AS moving_sum FROM source_table a ) SELECT column1, ts_column, moving_sum FROM SubQuery WHERE moving_sum > 100 ";
Describe the bug
There is an
unreachable!()
line inPushDownFilter
rule, whereLogicalPlan::Window
is being handled.datafusion/datafusion/optimizer/src/push_down_filter.rs
Line 1020 in f9cc332
The following query enters there:
To Reproduce
Expected behavior
It should run without error.
Additional context
This query works successfully:
However, if it becomes a subquery, then it starts to fail.
Handling the alias expr in the
if let
part solves the problem, but I am not sure it is the correct way.The text was updated successfully, but these errors were encountered: