[jira] [Commented] (DRILL-3679) IOB Exception : when window functions used in outer and inner query
[ https://issues.apache.org/jira/browse/DRILL-3679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14791355#comment-14791355 ] Victoria Markman commented on DRILL-3679: - Verified fixed in 1.2.0 #Wed Sep 16 00:30:47 UTC 2015 git.commit.id.abbrev=9afcf61 Test added to: Functional/Passing/window_functions/bugs > IOB Exception : when window functions used in outer and inner query > --- > > Key: DRILL-3679 > URL: https://issues.apache.org/jira/browse/DRILL-3679 > Project: Apache Drill > Issue Type: Bug > Components: Query Planning & Optimization >Affects Versions: 1.2.0 > Environment: private-branch > https://github.com/adeneche/incubator-drill/tree/new-window-funcs >Reporter: Khurram Faraaz >Assignee: Jinfeng Ni > Labels: window_function > Fix For: 1.2.0 > > > IOB Exception seen when two different window functions are used in inner and > outer queries. > {code} > 0: jdbc:drill:schema=dfs.tmp> select rnum, position_id, ntile(4) over(order > by position_id) from (select position_id, row_number() over(order by > position_id) as rnum from cp.`employee.json`); > java.lang.RuntimeException: java.sql.SQLException: SYSTEM ERROR: > IndexOutOfBoundsException: index: 0, length: 4 (expected: range(0, 0)) > Fragment 0:0 > [Error Id: 8e0cbf82-842d-4fa7-ab0d-1d982a3d6c24 on centos-03.qa.lab:31010] > at sqlline.IncrementalRows.hasNext(IncrementalRows.java:73) > at > sqlline.TableOutputFormat$ResizingRowsProvider.next(TableOutputFormat.java:87) > at sqlline.TableOutputFormat.print(TableOutputFormat.java:118) > 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)
[jira] [Commented] (DRILL-3679) IOB Exception : when window functions used in outer and inner query
[ https://issues.apache.org/jira/browse/DRILL-3679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14746584#comment-14746584 ] Khurram Faraaz commented on DRILL-3679: --- I see this JIRA is marked as resolved, but the issue still exists on master, see commit id below. I have verified fix for DRILL-3680 which is now Fixed on master, on the same commit id as this one. {code} 0: jdbc:drill:schema=dfs.tmp> select * from sys.version; +---+-++--++ | commit_id | commit_message |commit_time | build_email | build_time | +---+-++--++ | b525692e05c2a562a664093abd46bf68137b4a3b | DRILL-3280, DRILL-3360, DRILL-3601, DRILL-3649: Add test cases | 11.09.2015 @ 00:52:25 UTC | Unknown | 11.09.2015 @ 05:43:11 UTC | +---+-++--++ 1 row selected (0.209 seconds) 0: jdbc:drill:schema=dfs.tmp> select rnum, position_id, ntile(4) over(order by position_id) from (select position_id, row_number() over(order by position_id) as rnum from cp.`employee.json`); java.lang.RuntimeException: java.sql.SQLException: SYSTEM ERROR: IndexOutOfBoundsException: index: 0, length: 4 (expected: range(0, 0)) Fragment 0:0 [Error Id: 42b5d107-a3c8-477d-943d-40469f6cbd17 on centos-04.qa.lab:31010] at sqlline.IncrementalRows.hasNext(IncrementalRows.java:73) at sqlline.TableOutputFormat$ResizingRowsProvider.next(TableOutputFormat.java:87) at sqlline.TableOutputFormat.print(TableOutputFormat.java:118) 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) 0: jdbc:drill:schema=dfs.tmp> {code} > IOB Exception : when window functions used in outer and inner query > --- > > Key: DRILL-3679 > URL: https://issues.apache.org/jira/browse/DRILL-3679 > Project: Apache Drill > Issue Type: Bug > Components: Query Planning & Optimization >Affects Versions: 1.2.0 > Environment: private-branch > https://github.com/adeneche/incubator-drill/tree/new-window-funcs >Reporter: Khurram Faraaz >Assignee: Jinfeng Ni > Labels: window_function > Fix For: 1.2.0 > > > IOB Exception seen when two different window functions are used in inner and > outer queries. > {code} > 0: jdbc:drill:schema=dfs.tmp> select rnum, position_id, ntile(4) over(order > by position_id) from (select position_id, row_number() over(order by > position_id) as rnum from cp.`employee.json`); > java.lang.RuntimeException: java.sql.SQLException: SYSTEM ERROR: > IndexOutOfBoundsException: index: 0, length: 4 (expected: range(0, 0)) > Fragment 0:0 > [Error Id: 8e0cbf82-842d-4fa7-ab0d-1d982a3d6c24 on centos-03.qa.lab:31010] > at sqlline.IncrementalRows.hasNext(IncrementalRows.java:73) > at > sqlline.TableOutputFormat$ResizingRowsProvider.next(TableOutputFormat.java:87) > at sqlline.TableOutputFormat.print(TableOutputFormat.java:118) > 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)
[jira] [Commented] (DRILL-3679) IOB Exception : when window functions used in outer and inner query
[ https://issues.apache.org/jira/browse/DRILL-3679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14746594#comment-14746594 ] Jinfeng Ni commented on DRILL-3679: --- Can you run against the latest master branch? The fix for DRILL-3680 is in commit : 9afcf61f6c993cd028022d827daa7f873a61ffaa. The one you tried seems to be at least two days ago. > IOB Exception : when window functions used in outer and inner query > --- > > Key: DRILL-3679 > URL: https://issues.apache.org/jira/browse/DRILL-3679 > Project: Apache Drill > Issue Type: Bug > Components: Query Planning & Optimization >Affects Versions: 1.2.0 > Environment: private-branch > https://github.com/adeneche/incubator-drill/tree/new-window-funcs >Reporter: Khurram Faraaz >Assignee: Jinfeng Ni > Labels: window_function > Fix For: 1.2.0 > > > IOB Exception seen when two different window functions are used in inner and > outer queries. > {code} > 0: jdbc:drill:schema=dfs.tmp> select rnum, position_id, ntile(4) over(order > by position_id) from (select position_id, row_number() over(order by > position_id) as rnum from cp.`employee.json`); > java.lang.RuntimeException: java.sql.SQLException: SYSTEM ERROR: > IndexOutOfBoundsException: index: 0, length: 4 (expected: range(0, 0)) > Fragment 0:0 > [Error Id: 8e0cbf82-842d-4fa7-ab0d-1d982a3d6c24 on centos-03.qa.lab:31010] > at sqlline.IncrementalRows.hasNext(IncrementalRows.java:73) > at > sqlline.TableOutputFormat$ResizingRowsProvider.next(TableOutputFormat.java:87) > at sqlline.TableOutputFormat.print(TableOutputFormat.java:118) > 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)
[jira] [Commented] (DRILL-3679) IOB Exception : when window functions used in outer and inner query
[ https://issues.apache.org/jira/browse/DRILL-3679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14746598#comment-14746598 ] Khurram Faraaz commented on DRILL-3679: --- Ok I will verify and confirm. > IOB Exception : when window functions used in outer and inner query > --- > > Key: DRILL-3679 > URL: https://issues.apache.org/jira/browse/DRILL-3679 > Project: Apache Drill > Issue Type: Bug > Components: Query Planning & Optimization >Affects Versions: 1.2.0 > Environment: private-branch > https://github.com/adeneche/incubator-drill/tree/new-window-funcs >Reporter: Khurram Faraaz >Assignee: Jinfeng Ni > Labels: window_function > Fix For: 1.2.0 > > > IOB Exception seen when two different window functions are used in inner and > outer queries. > {code} > 0: jdbc:drill:schema=dfs.tmp> select rnum, position_id, ntile(4) over(order > by position_id) from (select position_id, row_number() over(order by > position_id) as rnum from cp.`employee.json`); > java.lang.RuntimeException: java.sql.SQLException: SYSTEM ERROR: > IndexOutOfBoundsException: index: 0, length: 4 (expected: range(0, 0)) > Fragment 0:0 > [Error Id: 8e0cbf82-842d-4fa7-ab0d-1d982a3d6c24 on centos-03.qa.lab:31010] > at sqlline.IncrementalRows.hasNext(IncrementalRows.java:73) > at > sqlline.TableOutputFormat$ResizingRowsProvider.next(TableOutputFormat.java:87) > at sqlline.TableOutputFormat.print(TableOutputFormat.java:118) > 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)
[jira] [Commented] (DRILL-3679) IOB Exception : when window functions used in outer and inner query
[ https://issues.apache.org/jira/browse/DRILL-3679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14709493#comment-14709493 ] Deneche A. Hakim commented on DRILL-3679: - Looking at the plan, this looks similar to DRILL-3680: the Project operator couldn't find {{w0$o00}} because both window functions output to the same field {{w0$o0}} {noformat} explain plan for select rnum, ntile(4) over(order by position_id) from (select position_id, row_number() over(order by position_id) as rnum from cp.`employee.json`); 00-00Screen 00-01 ProjectAllowDup(rnum=[$0], EXPR$1=[$1]) 00-02Project(w0$o0=[$1], w0$o00=[$2]) 00-03 Window(window#0=[window(partition {} order by [0] range between UNBOUNDED PRECEDING and CURRENT ROW aggs [NTILE($2)])]) 00-04SelectionVectorRemover 00-05 Sort(sort0=[$0], dir0=[ASC]) 00-06Project(position_id=[$1], w0$o0=[$2]) 00-07 Window(window#0=[window(partition {} order by [1] range between UNBOUNDED PRECEDING and CURRENT ROW aggs [ROW_NUMBER()])]) 00-08SelectionVectorRemover 00-09 Sort(sort0=[$1], dir0=[ASC]) 00-10Project(T7¦¦*=[$0], position_id=[$1]) 00-11 Scan(groupscan=[EasyGroupScan [selectionRoot=classpath:/employee.json, numFiles=1, columns=[`*`], files=[classpath:/employee.json]]]) ... }, { pop : window, @id : 7, child : 8, aggregations : [ { ref : `w0$o0`, expr : row_number(1) } ], orderings : [ { expr : `position_id`, order : ASC, nullDirection : UNSPECIFIED } ], start : -9223372036854775808, end : -9223372036854775808, initialAllocation : 100, maxAllocation : 100, withins : [ ], cost : 463.0 }, ... }, { pop : window, @id : 3, child : 4, aggregations : [ { ref : `w0$o0`, expr : ntile(4) } ], orderings : [ { expr : `position_id`, order : ASC, nullDirection : UNSPECIFIED } ], start : -9223372036854775808, end : -9223372036854775808, initialAllocation : 100, maxAllocation : 100, withins : [ ], cost : 463.0 }, { pop : project, @id : 2, exprs : [ { ref : `w0$o0`, expr : `w0$o0` }, { ref : `w0$o00`, expr : `w0$o0` } ], child : 3, initialAllocation : 100, maxAllocation : 100, cost : 463.0 }, { ... +--+--+ {noformat} IOB Exception : when window functions used in outer and inner query --- Key: DRILL-3679 URL: https://issues.apache.org/jira/browse/DRILL-3679 Project: Apache Drill Issue Type: Bug Components: Query Planning Optimization Affects Versions: 1.2.0 Environment: private-branch https://github.com/adeneche/incubator-drill/tree/new-window-funcs Reporter: Khurram Faraaz Assignee: Deneche A. Hakim Labels: window_function Fix For: 1.2.0 IOB Exception seen when two different window functions are used in inner and outer queries. {code} 0: jdbc:drill:schema=dfs.tmp select rnum, position_id, ntile(4) over(order by position_id) from (select position_id, row_number() over(order by position_id) as rnum from cp.`employee.json`); java.lang.RuntimeException: java.sql.SQLException: SYSTEM ERROR: IndexOutOfBoundsException: index: 0, length: 4 (expected: range(0, 0)) Fragment 0:0 [Error Id: 8e0cbf82-842d-4fa7-ab0d-1d982a3d6c24 on centos-03.qa.lab:31010] at sqlline.IncrementalRows.hasNext(IncrementalRows.java:73) at sqlline.TableOutputFormat$ResizingRowsProvider.next(TableOutputFormat.java:87) at sqlline.TableOutputFormat.print(TableOutputFormat.java:118) 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)