hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hive QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-19911) Hive delete queries fail with Invalid table alias or column reference
Date Thu, 28 Jun 2018 14:49:00 GMT

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

Hive QA commented on HIVE-19911:
--------------------------------



Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12929386/HIVE-19911.2-branch-2.3.patch

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

{color:red}ERROR:{color} -1 due to 10 failed/errored test(s), 10565 tests executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[comments] (batchId=35)
org.apache.hadoop.hive.cli.TestSparkCliDriver.org.apache.hadoop.hive.cli.TestSparkCliDriver
(batchId=113)
org.apache.hadoop.hive.cli.TestSparkCliDriver.testCliDriver[bucketmapjoin2] (batchId=98)
org.apache.hadoop.hive.cli.TestSparkCliDriver.testCliDriver[cbo_udf_udaf] (batchId=98)
org.apache.hadoop.hive.cli.TestSparkCliDriver.testCliDriver[ptf_decimal] (batchId=98)
org.apache.hadoop.hive.cli.TestSparkCliDriver.testCliDriver[union23] (batchId=98)
org.apache.hadoop.hive.cli.TestSparkCliDriver.testCliDriver[union31] (batchId=98)
org.apache.hadoop.hive.ql.TestTxnCommands2.testNonAcidToAcidConversion02 (batchId=263)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdate.testNonAcidToAcidConversion02 (batchId=275)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testNonAcidToAcidConversion02
(batchId=272)
{noformat}

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

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: 10 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12929386 - PreCommit-HIVE-Build

> Hive delete queries fail with Invalid table alias or column reference
> ---------------------------------------------------------------------
>
>                 Key: HIVE-19911
>                 URL: https://issues.apache.org/jira/browse/HIVE-19911
>             Project: Hive
>          Issue Type: Bug
>          Components: Transactions
>    Affects Versions: 2.3.3
>            Reporter: Mykhailo Kysliuk
>            Assignee: Mykhailo Kysliuk
>            Priority: Major
>         Attachments: HIVE-19911.1-branch-2.3.patch, HIVE-19911.2-branch-2.3.patch
>
>
> Env:
> hadoop-2.7.0
> hive-2.3.3
> OS:
> centos-release-7-5.1804.el7.centos.x86_64
> Steps to reproduce (at hive cli):
> {code}
> set hive.support.concurrency=true;
> set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
> DROP TABLE IF EXISTS detaillineitem_all;
> DROP TABLE IF EXISTS detaillineitem_all_delete_1526330755128;
> CREATE TABLE `detaillineitem_all`(
>   `detailid` decimal(20,0),
>   `branchnumber` varchar(3)
> ) PARTITIONED BY (
>   `branchnumber_p` varchar(3))
> CLUSTERED BY (
>   detailid)
> INTO 25 BUCKETS
> STORED AS ORC
> TBLPROPERTIES (
>   'orc.compress'='NONE',
>   'transactional'='true');
> CREATE TABLE `detaillineitem_all_delete_1526330755128`(
>   `detailid` decimal(20,0),
>   `branchnumber` varchar(3),
>   `branchnumber_p` varchar(3));
> DELETE from detaillineitem_all WHERE EXISTS (
>     SELECT
>         1
>     FROM
>         detaillineitem_all_delete_1526330755128 AS t1
>     WHERE
>         (detaillineitem_all.detailid = t1.detailid)
>       AND
>         (detaillineitem_all.branchnumber = CAST(t1.branchnumber AS STRING)));
> {code}
> Exception:
> {code}
> 2018-06-15T16:51:48,625 ERROR [f6bd86a7-04e5-4284-9031-3b9a0ccc80f3 main] ql.Driver:
FAILED: SemanticException Line 0:-1 Invalid table alias or column reference 'sq_1': (possible
column names are: mber)) sq_corr_1)) (tok_where (= 1 1), (. (tok_table_or_col sq_1) sq_corr_1))
> org.apache.hadoop.hive.ql.parse.SemanticException: Line 0:-1 Invalid table alias or column
reference 'sq_1': (possible column names are: mber)) sq_corr_1)) (tok_where (= 1 1), (. (tok_table_or_col
sq_1) sq_corr_1))
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genAllExprNodeDesc(SemanticAnalyzer.java:11620)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genExprNodeDesc(SemanticAnalyzer.java:11568)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genExprNodeDesc(SemanticAnalyzer.java:11536)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genExprNodeDesc(SemanticAnalyzer.java:11514)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genMapGroupByForSemijoin(SemanticAnalyzer.java:8416)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genJoinOperator(SemanticAnalyzer.java:8305)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genFilterPlan(SemanticAnalyzer.java:3278)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genBodyPlan(SemanticAnalyzer.java:9592)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:10549)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:10427)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genOPTree(SemanticAnalyzer.java:11125)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:11138)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:10807)
>         at org.apache.hadoop.hive.ql.parse.UpdateDeleteSemanticAnalyzer.analyzeInternal(UpdateDeleteSemanticAnalyzer.java:73)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:258)
>         at org.apache.hadoop.hive.ql.parse.UpdateDeleteSemanticAnalyzer.reparseAndSuperAnalyze(UpdateDeleteSemanticAnalyzer.java:462)
>         at org.apache.hadoop.hive.ql.parse.UpdateDeleteSemanticAnalyzer.analyzeDelete(UpdateDeleteSemanticAnalyzer.java:111)
>         at org.apache.hadoop.hive.ql.parse.UpdateDeleteSemanticAnalyzer.analyzeInternal(UpdateDeleteSemanticAnalyzer.java:81)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:258)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:512)
>         at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1317)
>         at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1457)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1237)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1227)
>         at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:233)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:184)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:403)
>         at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:821)
>         at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:759)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:686)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:498)
> {code}
> After some debugging, I investigated that start and end indexes of ASTNode to retrieve
string is incorrect. It happens at genFilterPlan after rewriting the where expression. When
ASTNode tries to retrieve string representation of current node it returns incorrect string
because of incorrect indexes and therefore the query crashes. 
> If we rewrite the astStr inside debugging, then all query string becomes correct and
query runs fine.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message