[
https://issues.apache.org/jira/browse/HIVE-25303?focusedWorklogId=626536&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-626536
]
ASF GitHub Bot logged work on HIVE-25303:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 22/Jul/21 10:15
Start Date: 22/Jul/21 10:15
Worklog Time Spent: 10m
Work Description: kgyrtkirk commented on a change in pull request #2442:
URL: https://github.com/apache/hive/pull/2442#discussion_r674664805
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
##########
@@ -13137,13 +13136,12 @@ private void updateDefaultTblProps(Map<String,
String> source, Map<String, Strin
*
* @param tblProp
* property map
- * @param isCTAS
Review comment:
I've manually tested the patch; when the translator is enabled; running
```
create table b as select 1 aa
```
results in
```
Caused by: org.apache.hadoop.hive.metastore.api.MetaException: An external
table's location should not be located within managed warehouse root directory,
table:b,location:/data/hive/warehouse/b,managed warehou
se:/data/hive/warehouse
at
org.apache.hadoop.hive.metastore.MetastoreDefaultTransformer.validateTablePaths(MetastoreDefaultTransformer.java:932)
~[hive-exec-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
```
running the same command with translator disabled results in an EXTERNAL
table which is also bad...
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
##########
@@ -22,7 +22,6 @@
import static
org.apache.hadoop.hive.conf.HiveConf.ConfVars.DYNAMICPARTITIONCONVERT;
import static
org.apache.hadoop.hive.conf.HiveConf.ConfVars.HIVE_DEFAULT_STORAGE_HANDLER;
import static org.apache.hadoop.hive.conf.HiveConf.ConfVars.HIVESTATSDBCLASS;
-import static
org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.TABLE_IS_CTAS;
Review comment:
could you please change the summary of the PR to something which makes
more sense than "Revert HIVE-24625 and update task compiler code to set ta"
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
##########
@@ -13137,13 +13136,12 @@ private void updateDefaultTblProps(Map<String,
String> source, Map<String, Strin
*
* @param tblProp
* property map
- * @param isCTAS
* @return Modified table property map
Review comment:
running `create table b2 as select 1 aa` while the translator is
disabled doesnt uncover exceptions ; however it results in an EXTERNAL table
which is also bad...
--
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: 626536)
Time Spent: 1h 20m (was: 1h 10m)
> CTAS hive.create.as.external.legacy tries to place data files in managed WH
> path
> --------------------------------------------------------------------------------
>
> Key: HIVE-25303
> URL: https://issues.apache.org/jira/browse/HIVE-25303
> Project: Hive
> Issue Type: Bug
> Components: HiveServer2, Standalone Metastore
> Reporter: Sai Hemanth Gantasala
> Assignee: Sai Hemanth Gantasala
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> Under legacy table creation mode (hive.create.as.external.legacy=true), when
> a database has been created in a specific LOCATION, in a session where that
> database is USEd, tables created using
> CREATE TABLE <tablename> AS SELECT <select statement>
> should inherit the HDFS path from the database's location.
> Instead, Hive is trying to write the table data into
> /warehouse/tablespace/managed/hive/<database_directory_name>/<table_name>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)