You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "WangSheng (Jira)" <ji...@apache.org> on 2020/04/24 03:20:00 UTC

[jira] [Commented] (IMPALA-9688) Support create iceberg table by impala

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

WangSheng commented on IMPALA-9688:
-----------------------------------

Hi [~tarmstrong], [~stigahuang], I've already implemented a simple version to create iceberg table by impala. We can use the following sql to create an iceberg table:
{code:java}
    create table iceberg_test(
        level string,
        event_time string,
        message string)
    partition by spec(
        level identity,
        event_time identity
    )
    stored as iceberg;
{code}
this query would be transformed as a iceberg table shcema like this:
{code:java}
Schema schema = new Schema(
        Types.NestedField.required(1, "level", Types.StringType.get()),
        Types.NestedField.required(2, "event_time", Types.StringType.get()),
        Types.NestedField.required(3, "message", Types.StringType.get()));
    PartitionSpec spec = PartitionSpec.builderFor(schema).identity("event_time").identity("level").build();
    HadoopTables.create(schema, spec, location);
{code}
We can also use show create table xxx and show partitions xxx for iceberg. I referred to the implementation of kudu table by defined a new IcebergTable and related classes. I know there are many places need to be revised and improved. The point is I'm not sure if this solution is feasible, so hope you guys can give me some suggestions, thanks a lot!
And here is the gerrit url: https://gerrit.cloudera.org/#/c/15797


> Support create iceberg table by impala
> --------------------------------------
>
>                 Key: IMPALA-9688
>                 URL: https://issues.apache.org/jira/browse/IMPALA-9688
>             Project: IMPALA
>          Issue Type: Sub-task
>            Reporter: WangSheng
>            Assignee: WangSheng
>            Priority: Major
>
> This sub-task mainly realizes the creation of iceberg table through impala



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org