[ 
https://issues.apache.org/jira/browse/HIVE-26395?focusedWorklogId=791081&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-791081
 ]

ASF GitHub Bot logged work on HIVE-26395:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 14/Jul/22 18:01
            Start Date: 14/Jul/22 18:01
    Worklog Time Spent: 10m 
      Work Description: jfsii commented on code in PR #3443:
URL: https://github.com/apache/hive/pull/3443#discussion_r921434398


##########
hcatalog/core/src/main/java/org/apache/hive/hcatalog/cli/SemanticAnalysis/CreateTableHook.java:
##########
@@ -64,16 +64,13 @@ public ASTNode preAnalyze(HiveSemanticAnalyzerHookContext 
context,
     // Analyze and create tbl properties object
     int numCh = ast.getChildCount();
 
-    tableName = BaseSemanticAnalyzer.getUnescapedName((ASTNode) ast

Review Comment:
   The context for the changes in this file is that I am unsure this section of 
code ever worked and I am unsure of the intent.
   Specifically - hcatalog tests fail because this starts throwing the 
exception I removed. The reason for this is because TOK_LIKETABLE was part of 
every single CREATE TABLE AST (you can see me remove the always TOK_LIKETABLE 
in my refactor of the grammar). I attempted to keep it the way it was to 
minimize diff and to keep logical changes together - but after a few hours of 
battling ANTLR I couldn't figure out a clean way to do it. (Suggestions are 
welcome)





Issue Time Tracking
-------------------

    Worklog Id:     (was: 791081)
    Time Spent: 20m  (was: 10m)

> Support CREATE TABLE LIKE FILE for PARQUET
> ------------------------------------------
>
>                 Key: HIVE-26395
>                 URL: https://issues.apache.org/jira/browse/HIVE-26395
>             Project: Hive
>          Issue Type: New Feature
>          Components: HiveServer2
>            Reporter: John Sherman
>            Assignee: John Sherman
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> The intent is to allow a user to create a table and derive the schema from a 
> user provided parquet file. A secondary goal is to generalize this support so 
> other SerDes/formats could implement the feature easily.
> The proposed syntax is:
> CREATE TABLE <tableName> LIKE FILE <fileFormat> 'path to file';
> Example being:
> {code:java}
> CREATE TABLE like_test_all_types LIKE FILE PARQUET 
> '${system:test.tmp.dir}/test_all_types/000000_0';{code}
> with partitioning
> {code}
> CREATE TABLE like_test_partitioning LIKE FILE PARQUET 
> '${system:test.tmp.dir}/test_all_types/000000_0' PARTITIONED BY (year STRING, 
> month STRING);
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to