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

bug: cannot generate dynamic filter when it should be able to #8573

Closed
lmatz opened this issue Mar 15, 2023 · 0 comments · Fixed by #8588
Closed

bug: cannot generate dynamic filter when it should be able to #8573

lmatz opened this issue Mar 15, 2023 · 0 comments · Fixed by #8588
Assignees
Labels
type/bug Something isn't working
Milestone

Comments

@lmatz
Copy link
Contributor

lmatz commented Mar 15, 2023

create table T (t timestamp, a int[]);
explain create materialized view mv as select unnest(a), t from T where t >= (select MAX(t - interval '1' hour) t from T);
ERROR:  QueryError: Not supported: streaming nested-loop join
create table T (t timestamp, a int);

explain create materialized view mv as select a, t from T where t >= (select MAX(t - interval '1' hour) t from T);
                                                 QUERY PLAN                                                 
------------------------------------------------------------------------------------------------------------
 StreamMaterialize { columns: [a, t, t._row_id(hidden)], pk_columns: [t._row_id], pk_conflict: "no check" }
 └─StreamProject { exprs: [t.a, t.t, t._row_id] }
   └─StreamDynamicFilter { predicate: (t.t >= max(max($expr1))) }
     ├─StreamTableScan { table: t, columns: [t, a, _row_id] }
     └─StreamExchange { dist: Broadcast }
       └─StreamProject { exprs: [max(max($expr1))] }
         └─StreamGlobalSimpleAgg { aggs: [max(max($expr1)), count] }
           └─StreamExchange { dist: Single }
             └─StreamHashAgg { group_key: [$expr2], aggs: [max($expr1), count] }
               └─StreamProject { exprs: [$expr1, t._row_id, Vnode(t._row_id) as $expr2] }
                 └─StreamProject { exprs: [(t.t - '01:00:00':Interval) as $expr1, t._row_id] }
                   └─StreamTableScan { table: t, columns: [t, _row_id] }
(12 rows)


explain create materialized view mv as select a, t from T where t >= (select MAX(t) t from T) - interval '1' hour;
ERROR:  QueryError: Not supported: streaming nested-loop join
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
2 participants