[ https://issues.apache.org/jira/browse/DRILL-3288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Victoria Markman updated DRILL-3288: ------------------------------------ Summary: False "Hash aggregate does not support schema changes" error message in a query with merge join and hash aggregation (was: False "Hash aggregate does not support schema changes" error message in a query containing both window and regular aggregate function) > False "Hash aggregate does not support schema changes" error message in a > query with merge join and hash aggregation > -------------------------------------------------------------------------------------------------------------------- > > Key: DRILL-3288 > URL: https://issues.apache.org/jira/browse/DRILL-3288 > Project: Apache Drill > Issue Type: Bug > Components: Execution - Relational Operators > Affects Versions: 1.0.0 > Reporter: Victoria Markman > Assignee: Chris Westin > Labels: window_function > > This error seems to be happening only when you have both window and regular > aggregate function in a query. You will need to disable hash join to > reproduce this error: "alter session set `planner.enable_hashjoin` = false" > Columns in table j6 are all of 'optional' type, columns in j7 are all > "required" type. (attached sample for each) > Here are two queries that are failing for me: > Query 1 (aggregate function in the having clause): > {code} > 0: jdbc:drill:schema=dfs> select > . . . . . . . . . . . . > j6.c_integer, > . . . . . . . . . . . . > sum(j6.c_integer) over(partition by > j6.c_date order by j6.c_time) > . . . . . . . . . . . . > from > . . . . . . . . . . . . > j6, j7 > . . . . . . . . . . . . > where j6.c_integer = j7.c_integer > . . . . . . . . . . . . > group by > . . . . . . . . . . . . > j6.c_date, j6.c_time, j6.c_integer > . . . . . . . . . . . . > having > . . . . . . . . . . . . > avg(j7.c_integer) > 0; > java.lang.RuntimeException: java.sql.SQLException: UNSUPPORTED_OPERATION > ERROR: Hash aggregate does not support schema changes > Fragment 0:0 > [Error Id: ed0140d4-244c-4895-bf65-6ea1d085382e on atsqa4-133.qa.lab:31010] > at sqlline.IncrementalRows.hasNext(IncrementalRows.java:73) > at > sqlline.TableOutputFormat$ResizingRowsProvider.next(TableOutputFormat.java:85) > at sqlline.TableOutputFormat.print(TableOutputFormat.java:116) > at sqlline.SqlLine.print(SqlLine.java:1583) > at sqlline.Commands.execute(Commands.java:852) > at sqlline.Commands.sql(Commands.java:751) > at sqlline.SqlLine.dispatch(SqlLine.java:738) > at sqlline.SqlLine.begin(SqlLine.java:612) > at sqlline.SqlLine.start(SqlLine.java:366) > at sqlline.SqlLine.main(SqlLine.java:259) > {code} > Query 2: (window function and aggregate function in projection list): > {code} > 0: jdbc:drill:schema=dfs> select > . . . . . . . . . . . . > j6.c_integer, > . . . . . . . . . . . . > avg(j7.c_integer), > . . . . . . . . . . . . > sum(j6.c_integer) over(partition by > j6.c_date order by j6.c_time) > . . . . . . . . . . . . > from > . . . . . . . . . . . . > j6, j7 > . . . . . . . . . . . . > where j6.c_integer = j7.c_integer > . . . . . . . . . . . . > group by > . . . . . . . . . . . . > j6.c_date, j6.c_time, j6.c_integer; > java.lang.RuntimeException: java.sql.SQLException: UNSUPPORTED_OPERATION > ERROR: Hash aggregate does not support schema changes > Fragment 0:0 > [Error Id: 370188bd-012d-4fc2-a365-fe9e482aaa0f on atsqa4-133.qa.lab:31010] > at sqlline.IncrementalRows.hasNext(IncrementalRows.java:73) > at > sqlline.TableOutputFormat$ResizingRowsProvider.next(TableOutputFormat.java:85) > at sqlline.TableOutputFormat.print(TableOutputFormat.java:116) > at sqlline.SqlLine.print(SqlLine.java:1583) > at sqlline.Commands.execute(Commands.java:852) > at sqlline.Commands.sql(Commands.java:751) > at sqlline.SqlLine.dispatch(SqlLine.java:738) > at sqlline.SqlLine.begin(SqlLine.java:612) > at sqlline.SqlLine.start(SqlLine.java:366) > at sqlline.SqlLine.main(SqlLine.java:259) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)