[ https://issues.apache.org/jira/browse/HIVE-15539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15805825#comment-15805825 ]
Hive QA commented on HIVE-15539: -------------------------------- Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12846066/HIVE-15539.04.patch {color:green}SUCCESS:{color} +1 due to 2 test(s) being added or modified. {color:red}ERROR:{color} -1 due to 9 failed/errored test(s), 10885 tests executed *Failed tests:* {noformat} TestDerbyConnector - did not produce a TEST-*.xml file (likely timed out) (batchId=233) TestMiniSparkOnYarnCliDriver - did not produce a TEST-*.xml file (likely timed out) (batchId=159) [infer_bucket_sort_reducers_power_two.q,list_bucket_dml_10.q,orc_merge9.q,orc_merge6.q,leftsemijoin_mr.q,bucket6.q,bucketmapjoin7.q,uber_reduce.q,empty_dir_in_table.q,vector_outer_join3.q,index_bitmap_auto.q,vector_outer_join2.q,vector_outer_join1.q,orc_merge1.q,orc_merge_diff_fs.q,load_hdfs_file_with_space_in_the_name.q,scriptfile1_win.q,quotedid_smb.q,truncate_column_buckets.q,orc_merge3.q] org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[case_sensitivity] (batchId=61) org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[input_testxpath] (batchId=28) org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[udf_coalesce] (batchId=75) org.apache.hadoop.hive.cli.TestMiniLlapCliDriver.testCliDriver[orc_ppd_basic] (batchId=134) org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[columnstats_part_coltype] (batchId=150) org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[offset_limit_ppd_optimizer] (batchId=150) org.apache.hadoop.hive.cli.TestSparkCliDriver.org.apache.hadoop.hive.cli.TestSparkCliDriver (batchId=99) {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/2822/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/2822/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-2822/ 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: 9 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12846066 - PreCommit-HIVE-Build > Optimize complex multi-insert queries in Calcite > ------------------------------------------------ > > Key: HIVE-15539 > URL: https://issues.apache.org/jira/browse/HIVE-15539 > Project: Hive > Issue Type: Improvement > Components: Parser > Affects Versions: 2.2.0 > Reporter: Jesus Camacho Rodriguez > Assignee: Jesus Camacho Rodriguez > Attachments: HIVE-15539.03.patch, HIVE-15539.04.patch > > > Currently multi-insert queries are not optimized by Calcite. Proper > integration with Calcite would include creating a _spool_ operator whose > output is reused by every _insert_ statement; however, _spool_ operator has > not been added to Calcite yet (CALCITE-481). > In the meantime, and since complex logic for multi-insert queries is in FROM > clause, we can optimize the FROM clause with Calcite and connect the > optimized result to the original query. > Initially, we will recognize three different cases: > - FROM clause is trivial, e.g., table reference, or not supported. No need to > optimize with Calcite. > - FROM clause is a subquery. Optimize the subquery with Calcite. > - FROM clause is a join. Rewrite join into a subquery and optimize it with > Calcite. Change references in INSERT statements to refer to subquery columns. > This should be beneficial for MERGE statements processing too, since MERGE > statements are treated as multi-insert queries by Hive. -- This message was sent by Atlassian JIRA (v6.3.4#6332)