You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/01/19 16:22:19 UTC

[GitHub] [iceberg] humengyu2012 opened a new pull request #3929: Hive: Support 'identifier-field-ids' when creating table in hive

humengyu2012 opened a new pull request #3929:
URL: https://github.com/apache/iceberg/pull/3929


   Supporting 'identifier-field-ids' when creating table in hive.
   Although this feature is supported with json, it is too difficult for most people to write a json string in hive sql.
   Creating a iceberg table in hive like:
   ```sql
   CREATE TABLE test_iceberg (
     c1 int,
     c2 int,
     c3 string
   ) 
   PARTITIONED BY (c4 string)
   STORED BY 'org.apache.iceberg.mr.hive.HiveIcebergStorageHandler'
   TBLPROPERTIES (
     'iceberg.identifier-field-names' = 'c1,c2'
   );
   ```
   We could obtain an iceberg table:
   ```
   {
     "format-version" : 1,
     "table-uuid" : "073ae5b4-77d8-4fe9-b62b-2d44f7333fcc",
     "location" : "hdfs://inner-hadoop06.dev.rack.zhihu.com:8020/user/hive/warehouse/test_iceberg",
     "last-updated-ms" : 1642609200015,
     "last-column-id" : 4,
     "schema" : {
       "type" : "struct",
       "schema-id" : 0,
       "identifier-field-ids" : [ 1, 2 ],
       "fields" : [ {
         "id" : 1,
         "name" : "c1",
         "required" : true,
         "type" : "int"
       }, {
         "id" : 2,
         "name" : "c2",
         "required" : true,
         "type" : "int"
       }, {
         "id" : 3,
         "name" : "c3",
         "required" : false,
         "type" : "string"
       }, {
         "id" : 4,
         "name" : "c4",
         "required" : false,
         "type" : "string"
       } ]
     },
     "current-schema-id" : 0,
     "schemas" : [ {
       "type" : "struct",
       "schema-id" : 0,
       "identifier-field-ids" : [ 1, 2 ],
       "fields" : [ {
         "id" : 1,
         "name" : "c1",
         "required" : true,
         "type" : "int"
       }, {
         "id" : 2,
         "name" : "c2",
         "required" : true,
         "type" : "int"
       }, {
         "id" : 3,
         "name" : "c3",
         "required" : false,
         "type" : "string"
       }, {
         "id" : 4,
         "name" : "c4",
         "required" : false,
         "type" : "string"
       } ]
     } ],
     "partition-spec" : [ {
       "name" : "c4",
       "transform" : "identity",
       "source-id" : 4,
       "field-id" : 1000
     } ],
     "default-spec-id" : 0,
     "partition-specs" : [ {
       "spec-id" : 0,
       "fields" : [ {
         "name" : "c4",
         "transform" : "identity",
         "source-id" : 4,
         "field-id" : 1000
       } ]
     } ],
     "last-partition-id" : 1000,
     "default-sort-order-id" : 0,
     "sort-orders" : [ {
       "order-id" : 0,
       "fields" : [ ]
     } ],
     "properties" : {
       "engine.hive.enabled" : "true",
       "storage_handler" : "org.apache.iceberg.mr.hive.HiveIcebergStorageHandler"
     },
     "current-snapshot-id" : -1,
     "snapshots" : [ ],
     "snapshot-log" : [ ],
     "metadata-log" : [ ]
   }
   ```


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [iceberg] humengyu2012 commented on pull request #3929: Hive: Support 'identifier-field-ids' when creating table in hive

Posted by GitBox <gi...@apache.org>.
humengyu2012 commented on pull request #3929:
URL: https://github.com/apache/iceberg/pull/3929#issuecomment-1016635701


   Issue https://github.com/apache/iceberg/issues/3920.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [iceberg] humengyu2012 closed pull request #3929: Hive: Support 'identifier-field-ids' when creating table in hive

Posted by GitBox <gi...@apache.org>.
humengyu2012 closed pull request #3929:
URL: https://github.com/apache/iceberg/pull/3929


   


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [iceberg] humengyu2012 removed a comment on pull request #3929: Hive: Support 'identifier-field-ids' when creating table in hive

Posted by GitBox <gi...@apache.org>.
humengyu2012 removed a comment on pull request #3929:
URL: https://github.com/apache/iceberg/pull/3929#issuecomment-1016635701


   Issue https://github.com/apache/iceberg/issues/3920.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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