[ https://issues.apache.org/jira/browse/HIVE-16117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15972638#comment-15972638 ]
Hive QA commented on HIVE-16117: -------------------------------- Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12863804/HIVE-16117.patch {color:red}ERROR:{color} -1 due to no test(s) being added or modified. {color:red}ERROR:{color} -1 due to 4 failed/errored test(s), 10576 tests executed *Failed tests:* {noformat} org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[vector_order_null] (batchId=27) org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[limit_join_transpose] (batchId=146) org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[vector_if_expr] (batchId=143) org.apache.hadoop.hive.cli.TestSparkNegativeCliDriver.org.apache.hadoop.hive.cli.TestSparkNegativeCliDriver (batchId=236) {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/4728/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/4728/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-4728/ 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: 4 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12863804 - PreCommit-HIVE-Build > SortProjectTransposeRule should check for monotonicity preserving CAST > ---------------------------------------------------------------------- > > Key: HIVE-16117 > URL: https://issues.apache.org/jira/browse/HIVE-16117 > Project: Hive > Issue Type: Bug > Components: CBO > Affects Versions: 2.2.0 > Reporter: Jesus Camacho Rodriguez > Assignee: Jesus Camacho Rodriguez > Attachments: HIVE-16117.patch > > > Due to CALCITE-1618, we need to move to new Calcite release to fix it. > Due to this, SortProjectTransposeRule ignores CAST in the Project operator. > For instance: > {noformat} > ... > HiveSortLimit(sort0=$4,sort1=$2,dir0=ASC-nulls-first,dir1=DESC-nulls-last,fetch=10) > HiveProject(robot=$0,_o__c1=$2,m=$3,s=$4,(tok_function tok_int > (tok_table_or_col robot))=CAST($0):INTEGER)) > ... > {noformat} > will be transformed into: > {noformat} > ... > HiveProject(robot=$0,_o__c1=$2,m=$3,s=$4,(tok_function tok_int > (tok_table_or_col robot))=CAST($0):INTEGER)) > > HiveSortLimit(sort0=$0,sort1=$2,dir0=ASC-nulls-first,dir1=DESC-nulls-last,fetch=10) > ... > {noformat} > which is incorrect. > The problem seems to be in the _permutation_ method in RelOptUtil, which is > called in L87. The method actually considers a CAST on a reference as a valid > column permutation of the column referenced; probably it should not. > _permutation_ is only called by this rule and UnionPullUpConstantsRule, thus > it seems it is safe to fix the semantics of the method. -- This message was sent by Atlassian JIRA (v6.3.15#6346)