[jira] [Commented] (HIVE-4662) first_value can't have more than one order by column
[ https://issues.apache.org/jira/browse/HIVE-4662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15199146#comment-15199146 ] Lefty Leverenz commented on HIVE-4662: -- Doc note: This should be documented in the Windowing and Analytics wikidoc for release 2.1.0. * [Windowing and Analytics -- Enhancements to HiveQL -- FIRST_VALUE | https://cwiki.apache.org/confluence/display/Hive/LanguageManual+WindowingAndAnalytics#LanguageManualWindowingAndAnalytics-EnhancementstoHiveQL] * [Windowing and Analytics -- Examples (none yet) | https://cwiki.apache.org/confluence/display/Hive/LanguageManual+WindowingAndAnalytics#LanguageManualWindowingAndAnalytics-Examples] Also, [~the6campbells] wrote: {quote} not just first value select c1, c2, sum ( c3 ) over ( partition by c1 order by c2, c3 ) from t {quote} So does the patch cover more than just first_value? A release note would be helpful. > first_value can't have more than one order by column > > > Key: HIVE-4662 > URL: https://issues.apache.org/jira/browse/HIVE-4662 > Project: Hive > Issue Type: Bug > Components: SQL >Affects Versions: 0.11.0 >Reporter: Frans Drijver >Assignee: Jesus Camacho Rodriguez > Labels: TODOC2.1 > Fix For: 2.1.0 > > Attachments: HIVE-4662.01.patch, HIVE-4662.01.patch, > HIVE-4662.01.patch, HIVE-4662.patch > > > In the current implementation of the first_value function, it's not allowed > to have more than one (1) order by column, as so: > {quote} > select distinct > first_value(kastr.DEWNKNR) over ( partition by kastr.DEKTRNR order by > kastr.DETRADT, kastr.DEVPDNR ) > from RTAVP_DRKASTR kastr > ; > {quote} > Error given: > {quote} > FAILED: SemanticException Range based Window Frame can have only 1 Sort Key > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-4662) first_value can't have more than one order by column
[ https://issues.apache.org/jira/browse/HIVE-4662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15197910#comment-15197910 ] Jesus Camacho Rodriguez commented on HIVE-4662: --- [~ashutoshc], if {{range unbounded preceding}} is used for row_number(), we throw the following exception (line 402, PTFTranslator): {noformat} Expecting right window frame boundary for function row_number()... {noformat} The reason is by default, {{range unbounded preceding}} is transformed into {{range between unbounded preceding and current row}} (this is correct). However, GenericUDAFRowNumber sets _supportsWindow_ to false, and thus, it can only be used with {{between unbounded preceding and unbounded following}}. Hence, I propose we study this into more detail and maybe we solve it in a follow-up issue, as it seems it is unrelated to this one. What do you think? Is it OK to check this one in? > first_value can't have more than one order by column > > > Key: HIVE-4662 > URL: https://issues.apache.org/jira/browse/HIVE-4662 > Project: Hive > Issue Type: Bug > Components: SQL >Affects Versions: 0.11.0 >Reporter: Frans Drijver >Assignee: Jesus Camacho Rodriguez > Attachments: HIVE-4662.01.patch, HIVE-4662.01.patch, > HIVE-4662.01.patch, HIVE-4662.patch > > > In the current implementation of the first_value function, it's not allowed > to have more than one (1) order by column, as so: > {quote} > select distinct > first_value(kastr.DEWNKNR) over ( partition by kastr.DEKTRNR order by > kastr.DETRADT, kastr.DEVPDNR ) > from RTAVP_DRKASTR kastr > ; > {quote} > Error given: > {quote} > FAILED: SemanticException Range based Window Frame can have only 1 Sort Key > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-4662) first_value can't have more than one order by column
[ https://issues.apache.org/jira/browse/HIVE-4662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15197932#comment-15197932 ] Ashutosh Chauhan commented on HIVE-4662: yeah... we can take that up in follow-on. +1 > first_value can't have more than one order by column > > > Key: HIVE-4662 > URL: https://issues.apache.org/jira/browse/HIVE-4662 > Project: Hive > Issue Type: Bug > Components: SQL >Affects Versions: 0.11.0 >Reporter: Frans Drijver >Assignee: Jesus Camacho Rodriguez > Attachments: HIVE-4662.01.patch, HIVE-4662.01.patch, > HIVE-4662.01.patch, HIVE-4662.patch > > > In the current implementation of the first_value function, it's not allowed > to have more than one (1) order by column, as so: > {quote} > select distinct > first_value(kastr.DEWNKNR) over ( partition by kastr.DEKTRNR order by > kastr.DETRADT, kastr.DEVPDNR ) > from RTAVP_DRKASTR kastr > ; > {quote} > Error given: > {quote} > FAILED: SemanticException Range based Window Frame can have only 1 Sort Key > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-4662) first_value can't have more than one order by column
[ https://issues.apache.org/jira/browse/HIVE-4662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15194853#comment-15194853 ] Hive QA commented on HIVE-4662: --- Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12793291/HIVE-4662.01.patch {color:green}SUCCESS:{color} +1 due to 1 test(s) being added or modified. {color:red}ERROR:{color} -1 due to 5 failed/errored test(s), 9811 tests executed *Failed tests:* {noformat} TestSparkCliDriver-groupby3_map.q-sample2.q-auto_join14.q-and-12-more - did not produce a TEST-*.xml file TestSparkCliDriver-groupby_map_ppr_multi_distinct.q-table_access_keys_stats.q-groupby4_noskew.q-and-12-more - did not produce a TEST-*.xml file TestSparkCliDriver-join_rc.q-insert1.q-vectorized_rcfile_columnar.q-and-12-more - did not produce a TEST-*.xml file TestSparkCliDriver-ppd_join4.q-join9.q-ppd_join3.q-and-12-more - did not produce a TEST-*.xml file TestSparkCliDriver-timestamp_lazy.q-bucketsortoptimize_insert_4.q-date_udf.q-and-12-more - did not produce a TEST-*.xml file {noformat} Test results: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/7270/testReport Console output: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/7270/console Test logs: http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-7270/ Messages: {noformat} Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 5 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12793291 - PreCommit-HIVE-TRUNK-Build > first_value can't have more than one order by column > > > Key: HIVE-4662 > URL: https://issues.apache.org/jira/browse/HIVE-4662 > Project: Hive > Issue Type: Bug > Components: SQL >Affects Versions: 0.11.0 >Reporter: Frans Drijver >Assignee: Jesus Camacho Rodriguez > Attachments: HIVE-4662.01.patch, HIVE-4662.01.patch, > HIVE-4662.01.patch, HIVE-4662.patch > > > In the current implementation of the first_value function, it's not allowed > to have more than one (1) order by column, as so: > {quote} > select distinct > first_value(kastr.DEWNKNR) over ( partition by kastr.DEKTRNR order by > kastr.DETRADT, kastr.DEVPDNR ) > from RTAVP_DRKASTR kastr > ; > {quote} > Error given: > {quote} > FAILED: SemanticException Range based Window Frame can have only 1 Sort Key > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-4662) first_value can't have more than one order by column
[ https://issues.apache.org/jira/browse/HIVE-4662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15191485#comment-15191485 ] Ashutosh Chauhan commented on HIVE-4662: Actually {{range unbounded preceding}} is supported syntax atleast on postgres. I need to read standard to figure out if boundaries indeed is {{range between unbounded preceding and unbounded following}} in this semi-specified case. > first_value can't have more than one order by column > > > Key: HIVE-4662 > URL: https://issues.apache.org/jira/browse/HIVE-4662 > Project: Hive > Issue Type: Bug > Components: SQL >Affects Versions: 0.11.0 >Reporter: Frans Drijver >Assignee: Jesus Camacho Rodriguez > Attachments: HIVE-4662.01.patch, HIVE-4662.01.patch, HIVE-4662.patch > > > In the current implementation of the first_value function, it's not allowed > to have more than one (1) order by column, as so: > {quote} > select distinct > first_value(kastr.DEWNKNR) over ( partition by kastr.DEKTRNR order by > kastr.DETRADT, kastr.DEVPDNR ) > from RTAVP_DRKASTR kastr > ; > {quote} > Error given: > {quote} > FAILED: SemanticException Range based Window Frame can have only 1 Sort Key > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-4662) first_value can't have more than one order by column
[ https://issues.apache.org/jira/browse/HIVE-4662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15190613#comment-15190613 ] Jesus Camacho Rodriguez commented on HIVE-4662: --- [~ashutoshc], I have just added them. However, second one (row_number) should be executed over full partition, right? Thus, finally I added: {noformat} select row_number() over (partition by si, bo order by i, f desc range between unbounded preceding and unbounded following) from over10k limit 100; {noformat} Observe that both ends are unbounded. > first_value can't have more than one order by column > > > Key: HIVE-4662 > URL: https://issues.apache.org/jira/browse/HIVE-4662 > Project: Hive > Issue Type: Bug > Components: SQL >Affects Versions: 0.11.0 >Reporter: Frans Drijver >Assignee: Jesus Camacho Rodriguez > Attachments: HIVE-4662.01.patch, HIVE-4662.01.patch, HIVE-4662.patch > > > In the current implementation of the first_value function, it's not allowed > to have more than one (1) order by column, as so: > {quote} > select distinct > first_value(kastr.DEWNKNR) over ( partition by kastr.DEKTRNR order by > kastr.DETRADT, kastr.DEVPDNR ) > from RTAVP_DRKASTR kastr > ; > {quote} > Error given: > {quote} > FAILED: SemanticException Range based Window Frame can have only 1 Sort Key > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-4662) first_value can't have more than one order by column
[ https://issues.apache.org/jira/browse/HIVE-4662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15190383#comment-15190383 ] Ashutosh Chauhan commented on HIVE-4662: +1 Patch looks good. Can you also add following test: {code} select last_value(i) over (partition by si, bo order by i, f desc range current row) from over10k limit 100; select row_number() over (partition by si, bo order by i, f desc range unbounded preceding) from over10k limit 100; {code} > first_value can't have more than one order by column > > > Key: HIVE-4662 > URL: https://issues.apache.org/jira/browse/HIVE-4662 > Project: Hive > Issue Type: Bug > Components: SQL >Affects Versions: 0.11.0 >Reporter: Frans Drijver >Assignee: Jesus Camacho Rodriguez > Attachments: HIVE-4662.01.patch, HIVE-4662.patch > > > In the current implementation of the first_value function, it's not allowed > to have more than one (1) order by column, as so: > {quote} > select distinct > first_value(kastr.DEWNKNR) over ( partition by kastr.DEKTRNR order by > kastr.DETRADT, kastr.DEVPDNR ) > from RTAVP_DRKASTR kastr > ; > {quote} > Error given: > {quote} > FAILED: SemanticException Range based Window Frame can have only 1 Sort Key > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-4662) first_value can't have more than one order by column
[ https://issues.apache.org/jira/browse/HIVE-4662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15187353#comment-15187353 ] Jesus Camacho Rodriguez commented on HIVE-4662: --- [~ashutoshc], you are right, I focused on the multiple order by columns and I even did not realize about the DISTINCT. I removed the DISTINCT keyword for the example query. That way this patch can go in. I will follow up on the issue with DISTINCT in HIVE-13242. I explored a bit and it seems that DISTINCT keyword in select clause is completely ignored for windowing functions. > first_value can't have more than one order by column > > > Key: HIVE-4662 > URL: https://issues.apache.org/jira/browse/HIVE-4662 > Project: Hive > Issue Type: Bug > Components: SQL >Affects Versions: 0.11.0 >Reporter: Frans Drijver >Assignee: Jesus Camacho Rodriguez > Attachments: HIVE-4662.01.patch, HIVE-4662.patch > > > In the current implementation of the first_value function, it's not allowed > to have more than one (1) order by column, as so: > {quote} > select distinct > first_value(kastr.DEWNKNR) over ( partition by kastr.DEKTRNR order by > kastr.DETRADT, kastr.DEVPDNR ) > from RTAVP_DRKASTR kastr > ; > {quote} > Error given: > {quote} > FAILED: SemanticException Range based Window Frame can have only 1 Sort Key > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-4662) first_value can't have more than one order by column
[ https://issues.apache.org/jira/browse/HIVE-4662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15186165#comment-15186165 ] Ashutosh Chauhan commented on HIVE-4662: I think issue of distinct getting ignored is a separate issue (as Yin pointed out parser is dropping it). If it so, than thats a separate issue we should deal in a different jira than this one of multiple order by expressions. > first_value can't have more than one order by column > > > Key: HIVE-4662 > URL: https://issues.apache.org/jira/browse/HIVE-4662 > Project: Hive > Issue Type: Bug > Components: SQL >Affects Versions: 0.11.0 >Reporter: Frans Drijver >Assignee: Jesus Camacho Rodriguez > Attachments: HIVE-4662.patch > > > In the current implementation of the first_value function, it's not allowed > to have more than one (1) order by column, as so: > {quote} > select distinct > first_value(kastr.DEWNKNR) over ( partition by kastr.DEKTRNR order by > kastr.DETRADT, kastr.DEVPDNR ) > from RTAVP_DRKASTR kastr > ; > {quote} > Error given: > {quote} > FAILED: SemanticException Range based Window Frame can have only 1 Sort Key > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-4662) first_value can't have more than one order by column
[ https://issues.apache.org/jira/browse/HIVE-4662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15185949#comment-15185949 ] Aihua Xu commented on HIVE-4662: I see. So it will do a final distinct. > first_value can't have more than one order by column > > > Key: HIVE-4662 > URL: https://issues.apache.org/jira/browse/HIVE-4662 > Project: Hive > Issue Type: Bug > Components: SQL >Affects Versions: 0.11.0 >Reporter: Frans Drijver >Assignee: Jesus Camacho Rodriguez > Attachments: HIVE-4662.patch > > > In the current implementation of the first_value function, it's not allowed > to have more than one (1) order by column, as so: > {quote} > select distinct > first_value(kastr.DEWNKNR) over ( partition by kastr.DEKTRNR order by > kastr.DETRADT, kastr.DEVPDNR ) > from RTAVP_DRKASTR kastr > ; > {quote} > Error given: > {quote} > FAILED: SemanticException Range based Window Frame can have only 1 Sort Key > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-4662) first_value can't have more than one order by column
[ https://issues.apache.org/jira/browse/HIVE-4662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15185901#comment-15185901 ] Ashutosh Chauhan commented on HIVE-4662: I tested on postgres. Query for both with or without distinct is valid and gives different results as expected (with duplicates being removed) > first_value can't have more than one order by column > > > Key: HIVE-4662 > URL: https://issues.apache.org/jira/browse/HIVE-4662 > Project: Hive > Issue Type: Bug > Components: SQL >Affects Versions: 0.11.0 >Reporter: Frans Drijver >Assignee: Jesus Camacho Rodriguez > Attachments: HIVE-4662.patch > > > In the current implementation of the first_value function, it's not allowed > to have more than one (1) order by column, as so: > {quote} > select distinct > first_value(kastr.DEWNKNR) over ( partition by kastr.DEKTRNR order by > kastr.DETRADT, kastr.DEVPDNR ) > from RTAVP_DRKASTR kastr > ; > {quote} > Error given: > {quote} > FAILED: SemanticException Range based Window Frame can have only 1 Sort Key > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-4662) first_value can't have more than one order by column
[ https://issues.apache.org/jira/browse/HIVE-4662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15185875#comment-15185875 ] Aihua Xu commented on HIVE-4662: Yeah. distinct doesn't take effect and it doesn't make sense anyway here since this is partitioning windowing function, we need to have one first_value for each row in each partition. Maybe we should give an syntax error for it? > first_value can't have more than one order by column > > > Key: HIVE-4662 > URL: https://issues.apache.org/jira/browse/HIVE-4662 > Project: Hive > Issue Type: Bug > Components: SQL >Affects Versions: 0.11.0 >Reporter: Frans Drijver >Assignee: Jesus Camacho Rodriguez > Attachments: HIVE-4662.patch > > > In the current implementation of the first_value function, it's not allowed > to have more than one (1) order by column, as so: > {quote} > select distinct > first_value(kastr.DEWNKNR) over ( partition by kastr.DEKTRNR order by > kastr.DETRADT, kastr.DEVPDNR ) > from RTAVP_DRKASTR kastr > ; > {quote} > Error given: > {quote} > FAILED: SemanticException Range based Window Frame can have only 1 Sort Key > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-4662) first_value can't have more than one order by column
[ https://issues.apache.org/jira/browse/HIVE-4662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15185621#comment-15185621 ] Yin Huai commented on HIVE-4662: I think that DISTINCT keyword is dropped by the parser. > first_value can't have more than one order by column > > > Key: HIVE-4662 > URL: https://issues.apache.org/jira/browse/HIVE-4662 > Project: Hive > Issue Type: Bug > Components: SQL >Affects Versions: 0.11.0 >Reporter: Frans Drijver >Assignee: Jesus Camacho Rodriguez > Attachments: HIVE-4662.patch > > > In the current implementation of the first_value function, it's not allowed > to have more than one (1) order by column, as so: > {quote} > select distinct > first_value(kastr.DEWNKNR) over ( partition by kastr.DEKTRNR order by > kastr.DETRADT, kastr.DEVPDNR ) > from RTAVP_DRKASTR kastr > ; > {quote} > Error given: > {quote} > FAILED: SemanticException Range based Window Frame can have only 1 Sort Key > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-4662) first_value can't have more than one order by column
[ https://issues.apache.org/jira/browse/HIVE-4662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15185591#comment-15185591 ] Ashutosh Chauhan commented on HIVE-4662: Output of following query in test results looks incorrect: {code} select distinct first_value(t) over ( partition by si order by i, b ) from over10k limit 100; {code} It seems {distinct} is dropped. Also, add a test case without distinct. > first_value can't have more than one order by column > > > Key: HIVE-4662 > URL: https://issues.apache.org/jira/browse/HIVE-4662 > Project: Hive > Issue Type: Bug > Components: SQL >Affects Versions: 0.11.0 >Reporter: Frans Drijver >Assignee: Jesus Camacho Rodriguez > Attachments: HIVE-4662.patch > > > In the current implementation of the first_value function, it's not allowed > to have more than one (1) order by column, as so: > {quote} > select distinct > first_value(kastr.DEWNKNR) over ( partition by kastr.DEKTRNR order by > kastr.DETRADT, kastr.DEVPDNR ) > from RTAVP_DRKASTR kastr > ; > {quote} > Error given: > {quote} > FAILED: SemanticException Range based Window Frame can have only 1 Sort Key > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-4662) first_value can't have more than one order by column
[ https://issues.apache.org/jira/browse/HIVE-4662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15185358#comment-15185358 ] Jesus Camacho Rodriguez commented on HIVE-4662: --- Sure, I should have done before. Thanks! > first_value can't have more than one order by column > > > Key: HIVE-4662 > URL: https://issues.apache.org/jira/browse/HIVE-4662 > Project: Hive > Issue Type: Bug > Components: SQL >Affects Versions: 0.11.0 >Reporter: Frans Drijver >Assignee: Jesus Camacho Rodriguez > Attachments: HIVE-4662.patch > > > In the current implementation of the first_value function, it's not allowed > to have more than one (1) order by column, as so: > {quote} > select distinct > first_value(kastr.DEWNKNR) over ( partition by kastr.DEKTRNR order by > kastr.DETRADT, kastr.DEVPDNR ) > from RTAVP_DRKASTR kastr > ; > {quote} > Error given: > {quote} > FAILED: SemanticException Range based Window Frame can have only 1 Sort Key > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-4662) first_value can't have more than one order by column
[ https://issues.apache.org/jira/browse/HIVE-4662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15185341#comment-15185341 ] Ashutosh Chauhan commented on HIVE-4662: Can you create a RB for this ? > first_value can't have more than one order by column > > > Key: HIVE-4662 > URL: https://issues.apache.org/jira/browse/HIVE-4662 > Project: Hive > Issue Type: Bug > Components: SQL >Affects Versions: 0.11.0 >Reporter: Frans Drijver >Assignee: Jesus Camacho Rodriguez > Attachments: HIVE-4662.patch > > > In the current implementation of the first_value function, it's not allowed > to have more than one (1) order by column, as so: > {quote} > select distinct > first_value(kastr.DEWNKNR) over ( partition by kastr.DEKTRNR order by > kastr.DETRADT, kastr.DEVPDNR ) > from RTAVP_DRKASTR kastr > ; > {quote} > Error given: > {quote} > FAILED: SemanticException Range based Window Frame can have only 1 Sort Key > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-4662) first_value can't have more than one order by column
[ https://issues.apache.org/jira/browse/HIVE-4662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15182744#comment-15182744 ] Jesus Camacho Rodriguez commented on HIVE-4662: --- Fails are unrelated, [~ashutoshc], could you take a look? Thanks > first_value can't have more than one order by column > > > Key: HIVE-4662 > URL: https://issues.apache.org/jira/browse/HIVE-4662 > Project: Hive > Issue Type: Bug > Components: SQL >Affects Versions: 0.11.0 >Reporter: Frans Drijver >Assignee: Jesus Camacho Rodriguez > Attachments: HIVE-4662.patch > > > In the current implementation of the first_value function, it's not allowed > to have more than one (1) order by column, as so: > {quote} > select distinct > first_value(kastr.DEWNKNR) over ( partition by kastr.DEKTRNR order by > kastr.DETRADT, kastr.DEVPDNR ) > from RTAVP_DRKASTR kastr > ; > {quote} > Error given: > {quote} > FAILED: SemanticException Range based Window Frame can have only 1 Sort Key > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-4662) first_value can't have more than one order by column
[ https://issues.apache.org/jira/browse/HIVE-4662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15182358#comment-15182358 ] Hive QA commented on HIVE-4662: --- Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12791451/HIVE-4662.patch {color:green}SUCCESS:{color} +1 due to 1 test(s) being added or modified. {color:red}ERROR:{color} -1 due to 7 failed/errored test(s), 9782 tests executed *Failed tests:* {noformat} TestSparkCliDriver-groupby3_map.q-sample2.q-auto_join14.q-and-12-more - did not produce a TEST-*.xml file TestSparkCliDriver-groupby_map_ppr_multi_distinct.q-table_access_keys_stats.q-groupby4_noskew.q-and-12-more - did not produce a TEST-*.xml file TestSparkCliDriver-join_rc.q-insert1.q-vectorized_rcfile_columnar.q-and-12-more - did not produce a TEST-*.xml file TestSparkCliDriver-ppd_join4.q-join9.q-ppd_join3.q-and-12-more - did not produce a TEST-*.xml file org.apache.hadoop.hive.cli.TestNegativeCliDriver.testNegativeCliDriver_authorization_uri_import org.apache.hive.jdbc.TestJdbcWithMiniHS2.testAddJarDataNucleusUnCaching org.apache.hive.jdbc.TestSSL.testSSLVersion {noformat} Test results: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/7179/testReport Console output: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/7179/console Test logs: http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-7179/ Messages: {noformat} Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 7 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12791451 - PreCommit-HIVE-TRUNK-Build > first_value can't have more than one order by column > > > Key: HIVE-4662 > URL: https://issues.apache.org/jira/browse/HIVE-4662 > Project: Hive > Issue Type: Bug > Components: SQL >Affects Versions: 0.11.0 >Reporter: Frans Drijver >Assignee: Jesus Camacho Rodriguez > Attachments: HIVE-4662.patch > > > In the current implementation of the first_value function, it's not allowed > to have more than one (1) order by column, as so: > {quote} > select distinct > first_value(kastr.DEWNKNR) over ( partition by kastr.DEKTRNR order by > kastr.DETRADT, kastr.DEVPDNR ) > from RTAVP_DRKASTR kastr > ; > {quote} > Error given: > {quote} > FAILED: SemanticException Range based Window Frame can have only 1 Sort Key > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)