[
https://issues.apache.org/jira/browse/HIVE-28762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17929338#comment-17929338
]
Ayush Saxena commented on HIVE-28762:
-------------------------------------
Committed to master.
Thanx [~simhadri-g], [~difin] & [~dkuzmenko] for the reviews!!!
> Iceberg: Add support for partitions with transforms in Drop partition
> ---------------------------------------------------------------------
>
> Key: HIVE-28762
> URL: https://issues.apache.org/jira/browse/HIVE-28762
> Project: Hive
> Issue Type: Improvement
> Reporter: Ayush Saxena
> Assignee: Ayush Saxena
> Priority: Major
> Labels: pull-request-available
>
> If a partition column has some transform, drop partition doesn't do anything
> {noformat}
> CREATE TABLE drop_partition (
> sensor_id STRING,
> location_id STRING,
> reading_time TIMESTAMP,
> temperature DOUBLE,
> humidity DOUBLE
> )
> PARTITIONED BY SPEC (location_id, days(reading_time))
> STORED BY ICEBERG
> TBLPROPERTIES (
> 'write.format.default'='parquet',
> 'format-version'='2',
> 'write.parquet.compression-codec'='gzip'
> );
> INSERT INTO drop_partition VALUES
> ('sensor_001', 'loc_001', '2024-06-01 10:00:00', 22.5, 60.0),
> ('sensor_002', 'loc_002', '2024-06-01 10:15:00', 23.0, 58.0),
> ('sensor_001', 'loc_001', '2024-06-02 11:00:00', 22.8, 61.0);
> ALTER TABLE drop_partition DROP PARTITION (location_id = 'loc_002',
> day(reading_time) = '2024-06-01');
> SELECT * FROM drop_partition;
> Expected output:
> sensor_001,loc_001,2024-06-01 10:00:00,22.5,60.0
> sensor_001,loc_001,2024-06-02 11:00:00,22.8,61.0
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)