hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lenni Kuff (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-10593) Support creating table from a file schema: CREATE TABLE ... LIKE <file_format> '/path/to/file'
Date Tue, 19 May 2015 14:52:59 GMT

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

Lenni Kuff commented on HIVE-10593:
-----------------------------------

[~singhashish] / [~rdblue] - Agree that we should avoid a table property because it doesn't
seem necessary. Allowing a directory to be passed in is a bit more complicated than a file
because you might have multiple files with different schemas in the directory and you need
to add logic to verify the schemas match. I would suggest initially supporting file-only.

Do you have feedback on the syntax described in this JIRA? It seems like it avoids the use
of table properties and the syntax is fairly natural (similar to CREATE TABLE LIKE otherTable).

> Support creating table from a file schema: CREATE TABLE ... LIKE <file_format>
'/path/to/file'
> ----------------------------------------------------------------------------------------------
>
>                 Key: HIVE-10593
>                 URL: https://issues.apache.org/jira/browse/HIVE-10593
>             Project: Hive
>          Issue Type: Improvement
>          Components: Query Processor
>    Affects Versions: 1.2.0
>            Reporter: Lenni Kuff
>
> It would be useful if Hive could infer the column definitions in a create table statement
from the underlying data file. For example:
> CREATE TABLE new_tbl LIKE PARQUET '/path/to/file.parquet';
> If the targeted file is not the specified file format, the statement should fail analysis.
In addition to PARQUET, it would be useful to support other formats such as AVRO, JSON, and
ORC.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message