[ 
https://issues.apache.org/jira/browse/HIVE-18390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16317922#comment-16317922
 ] 

Hive QA commented on HIVE-18390:
--------------------------------



Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12904937/HIVE-18390.patch

{color:green}SUCCESS:{color} +1 due to 1 test(s) being added or modified.

{color:red}ERROR:{color} -1 due to 21 failed/errored test(s), 11549 tests 
executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[auto_join25] (batchId=72)
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[char_pad_convert] 
(batchId=7)
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[ppd_join5] (batchId=35)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[bucket_map_join_tez1]
 (batchId=169)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[bucketsortoptimize_insert_2]
 (batchId=151)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[hybridgrace_hashjoin_2]
 (batchId=156)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[insert_values_orig_table_use_metadata]
 (batchId=164)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[llap_acid] 
(batchId=168)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[llap_acid_fast]
 (batchId=159)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[sysdb] 
(batchId=159)
org.apache.hadoop.hive.cli.TestMiniSparkOnYarnCliDriver.testCliDriver[bucketizedhiveinputformat]
 (batchId=177)
org.apache.hadoop.hive.cli.TestNegativeCliDriver.testCliDriver[authorization_part]
 (batchId=93)
org.apache.hadoop.hive.cli.TestNegativeCliDriver.testCliDriver[stats_aggregator_error_1]
 (batchId=93)
org.apache.hadoop.hive.cli.TestSparkCliDriver.testCliDriver[ppd_join5] 
(batchId=120)
org.apache.hadoop.hive.cli.control.TestDanglingQOuts.checkDanglingQOut 
(batchId=208)
org.apache.hadoop.hive.metastore.TestEmbeddedHiveMetaStore.testTransactionalValidation
 (batchId=213)
org.apache.hadoop.hive.ql.io.TestDruidRecordWriter.testWrite (batchId=253)
org.apache.hadoop.hive.ql.parse.TestReplicationScenarios.testConstraints 
(batchId=225)
org.apache.hive.jdbc.TestSSL.testConnectionMismatch (batchId=231)
org.apache.hive.jdbc.TestSSL.testConnectionWrongCertCN (batchId=231)
org.apache.hive.jdbc.TestSSL.testMetastoreConnectionWrongCertCN (batchId=231)
{noformat}

Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/8515/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/8515/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-8515/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.YetusPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 21 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12904937 - PreCommit-HIVE-Build

> IndexOutOfBoundsException when query a  partitioned view in ColumnPruner 
> -------------------------------------------------------------------------
>
>                 Key: HIVE-18390
>                 URL: https://issues.apache.org/jira/browse/HIVE-18390
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Planning, Views
>    Affects Versions: 2.1.1
>            Reporter: Hengyu Dai
>         Attachments: HIVE-18390.patch
>
>
> IndexOutOfBoundsException is encountered when query a partitioned view.
> in Column Prunning, each SEL operator collects the accessed column in current 
> SEL operator,
> When ColumnPrunerSelectProc getting a view's columns accessed, it will first 
> get the index of output column names in the view, then call 
> Table.getCols().get(index).getName() to finally get the 
> name of output column, but Table.getCols() will not return all columns 
> (partitioned column is
> lacked), so if partitioned columns is queried, an IndexOutOfBoundsException 
> will throw.
> REPRODUCE: 
> {code:sql}
> create table foo
> (
> `a` string
> ) partitioned by (`b` string)
> ;
> create view bar partitioned on (b) as
> select a,b from foo;
> select * from bar;     --IndexOutOfBoundsException
> {code}
> OPERATORE TREE:
> {code:java}
> TS[0]
>    |
> SEL[1]
>    |
> SEL[2]
>    |
> FS[3]
> {code}
> SEL[1] collects accessed column(contains partitioned column b), b's internal 
> column name is '_col1', the corresponding column index is 1, but actually 
> bar's getCols() returned a list of length 1: ['a'], so tab.getCols().get(1) 
> throw tab.getCols().get(index)
> HOW TO FIX:
> instead of call view's getCols() method, we should get all columns including 
> partitioned columns



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to