[
https://issues.apache.org/jira/browse/HIVE-25179?focusedWorklogId=604419&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-604419
]
ASF GitHub Bot logged work on HIVE-25179:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 01/Jun/21 10:04
Start Date: 01/Jun/21 10:04
Worklog Time Spent: 10m
Work Description: pvary commented on a change in pull request #2333:
URL: https://github.com/apache/hive/pull/2333#discussion_r642963610
##########
File path:
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergStorageHandlerNoScan.java
##########
@@ -155,6 +155,36 @@ public void after() throws Exception {
HiveIcebergStorageHandlerTestUtils.close(shell);
}
+ @Test
+ public void testPartitionTransform() {
+ Schema schema = new Schema(
+ optional(1, "id", Types.LongType.get()),
+ optional(2, "year_field", Types.DateType.get()),
+ optional(3, "month_field", Types.TimestampType.withZone()),
+ optional(4, "day_field", Types.TimestampType.withoutZone()),
+ optional(5, "hour_field", Types.TimestampType.withoutZone()),
+ optional(6, "truncate_field", Types.StringType.get()),
+ optional(7, "bucket_field", Types.StringType.get()),
+ optional(8, "identity_field", Types.StringType.get())
+ );
+ PartitionSpec spec =
PartitionSpec.builderFor(schema).year("year_field").month("month_field").day("day_field")
+ .hour("hour_field").truncate("truncate_field",
2).bucket("bucket_field", 2)
+ .identity("identity_field").build();
+ String tableName = "part_test";
+
+ TableIdentifier identifier = TableIdentifier.of("default", tableName);
+ shell.executeStatement("CREATE EXTERNAL TABLE " + identifier +
+ " PARTITIONED BY SPEC (year_field year, month_field month, day_field
day, hour_field hour, " +
+ "truncate_field truncate[2], bucket_field bucket[2], identity_field
identity)" +
+ " STORED BY '" + HiveIcebergStorageHandler.class.getName() + "' " +
Review comment:
We can use `STORED BY ICEBERG`
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 604419)
Time Spent: 50m (was: 40m)
> Support all partition transforms for Iceberg in create table
> ------------------------------------------------------------
>
> Key: HIVE-25179
> URL: https://issues.apache.org/jira/browse/HIVE-25179
> Project: Hive
> Issue Type: New Feature
> Reporter: László Pintér
> Assignee: László Pintér
> Priority: Major
> Labels: pull-request-available
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Enhance table create syntax with support to partition transforms:
> {code:sql}
> CREATE TABLE ... PARTITIONED BY SPEC(
> year_field year,
> month_field month,
> day_field day,
> hour_field hour,
> truncate_field truncate[3],
> bucket_field bucket[5],
> identity_field identity
> ) STORED BY ICEBERG;
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)