[
https://issues.apache.org/jira/browse/HIVE-20303?focusedWorklogId=656167&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-656167
]
ASF GitHub Bot logged work on HIVE-20303:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 28/Sep/21 14:08
Start Date: 28/Sep/21 14:08
Worklog Time Spent: 10m
Work Description: zabetak opened a new pull request #2679:
URL: https://github.com/apache/hive/pull/2679
### What changes were proposed in this pull request?
Extract the full table reference (DB name + table name) from the AST.
### Why are the changes needed?
Without these changes queries fail with `InvalidTableException`.
### Does this PR introduce _any_ user-facing change?
Queries will not fail.
### How was this patch tested?
`mvn test -Dtest=TestMiniLlapLocalCliDriver
-Dqfile=insert2_overwrite_partitions.q -Dtest.output.overwrite`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 656167)
Remaining Estimate: 0h
Time Spent: 10m
> INSERT OVERWRITE TABLE db.table PARTITION (...) IF NOT EXISTS throws
> InvalidTableException
> ------------------------------------------------------------------------------------------
>
> Key: HIVE-20303
> URL: https://issues.apache.org/jira/browse/HIVE-20303
> Project: Hive
> Issue Type: Bug
> Components: CLI
> Affects Versions: 2.2.0
> Reporter: xhmz
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The following scenario reproduces the problem:
> {code:sql}
> CREATE DATABASE db2;
> CREATE TABLE db2.destinTable (one STRING, two STRING) PARTITIONED BY (ds
> STRING);
> INSERT OVERWRITE TABLE db2.destinTable PARTITION (ds='2011-11-11') IF NOT
> EXISTS SELECT 100, 200;
> {code}
> The last query ({{INSERT OVERWRITE ...}}) fails with the following stack
> trace:
> {noformat}
> 2021-09-28T04:25:47,330 ERROR [e3399094-860f-4381-bfd3-d2acfa8a885d main]
> ql.Driver: FAILED: SemanticException
> org.apache.hadoop.hive.ql.metadata.InvalidTableException: Table not found db2
> org.apache.hadoop.hive.ql.parse.SemanticException:
> org.apache.hadoop.hive.ql.metadata.InvalidTableException: Table not found db2
> at
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1(SemanticAnalyzer.java:1918)
> at
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1(SemanticAnalyzer.java:1959)
> at
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genResolvedParseTree(SemanticAnalyzer.java:12393)
> at
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:12506)
> at
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:454)
> at
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:317)
> at org.apache.hadoop.hive.ql.Compiler.analyze(Compiler.java:223)
> at org.apache.hadoop.hive.ql.Compiler.compile(Compiler.java:105)
> at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:500)
> at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:453)
> at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:417)
> at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:411)
> at
> org.apache.hadoop.hive.ql.reexec.ReExecDriver.compileAndRespond(ReExecDriver.java:125)
> at
> org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:229)
> at
> org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:256)
> at
> org.apache.hadoop.hive.cli.CliDriver.processCmd1(CliDriver.java:201)
> at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:127)
> at
> org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:422)
> at
> org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:353)
> at
> org.apache.hadoop.hive.ql.QTestUtil.executeClientInternal(QTestUtil.java:804)
> at
> org.apache.hadoop.hive.ql.QTestUtil.executeClient(QTestUtil.java:774)
> at
> org.apache.hadoop.hive.cli.control.CoreCliDriver.runTest(CoreCliDriver.java:175)
> at
> org.apache.hadoop.hive.cli.control.CliAdapter.runTest(CliAdapter.java:157)
> at
> org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver(TestMiniLlapLocalCliDriver.java:62)
> {noformat}
> The problem does not reproduce when the {{IF NOT EXISTS}} clause is not
> present in the query.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)