[
https://issues.apache.org/jira/browse/IMPALA-2210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17923449#comment-17923449
]
Anshula Jain edited comment on IMPALA-2210 at 2/3/25 7:23 PM:
--------------------------------------------------------------
have performed a small test and the query works as requested in this Jira
Create a table called parqtab which store the data in parquet format.
{code:java}
create table parqtab(id int) stored as parquet;{code}
Insert some data in table -> parqtab
{code:java}
insert into parqtab values (1);
insert into parqtab values (2);
insert into parqtab values (3);
insert into parqtab values (4);{code}
When you describe the table, it shows that metadata file is storing data in
parquet format
{code:java}
describe formatted parqtab;{code}
Now create a new table using any of the parquet file from table parqtab ->
parqtab using LIKE PARQUET
{code:java}
create table parqtest LIKE PARQUET
"/warehouse/tablespace/managed/hive/parqtab/delta_1_1/a046ba141b622e09-c334efd400000000_1861561213_data.0.parq"{code}
Now verify the schema of the table using describe formatted and it shows that
metadata file are stored data in parquet format
{code:java}
describe formatted parqtest;{code}
was (Author: JIRAUSER302649):
have perfomed a small test
> Make Parquet the default file format
> ------------------------------------
>
> Key: IMPALA-2210
> URL: https://issues.apache.org/jira/browse/IMPALA-2210
> Project: IMPALA
> Issue Type: Improvement
> Components: Frontend
> Affects Versions: Impala 2.2.4
> Reporter: John Russell
> Priority: Blocker
> Labels: incompatibility, newbie, usability
>
> I expect that by far the most common use case for CREATE TABLE LIKE PARQUET
> is to make a table where the specified Parquet file will be queried. That
> is, either:
> CREATE TABLE foo LIKE PARQUET '/blah/blah/file.parq' STORED AS PARQUET;
> LOAD DATA INFILE '/blah/blah/file.parq' INTO TABLE foo;
> or
> CREATE EXTERNAL TABLE foo LIKE PARQUET '/blah/blah/file.parq' STORED AS
> PARQUET LOCATION '/blah/blah';
> I have difficulty imagining a case where someone would do CREATE TABLE LIKE
> PARQUET and want the result to be a text table. Even if someone planned to
> convert Parquet -> text, they would need to have a Parquet table to begin
> with, in which case they would do CREATE TABLE text_table LIKE parquet_table,
> not CREATE TABLE LIKE PARQUET.
> It is easy to leave off the STORED AS PARQUET clause by mistake from a CTLP
> statement, because PARQUET already occurs earlier in the statement, resulting
> in a text table that throws conversion errors when queried. How about making
> Parquet the default format in this case, and requiring the STORED AS clause
> only to use a different file format? (Then if Impala implemented a CREATE
> TABLE LIKE AVRO syntax, the default in that case would be Avro.)
> Since I guess this would qualify as an incompatible change, we would need to
> think through the appropriate release vehicle.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]