tony-ps-lin-appier opened a new issue, #6439:
URL: https://github.com/apache/paimon/issues/6439

   ### Search before asking
   
   - [x] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   
   ### Paimon version
   
   1.2.0
   
   ### Compute Engine
   
   spark 3.5
   
   ### Minimal reproduce step
   
   1. create table
   ```
   CREATE TABLE .main.test (
       order_id          STRING,
       order_price       DOUBLE,
       order_date        DATE
   )
   USING paimon
   PARTITIONED BY (order_date)
   TBLPROPERTIES (
     'bucket-key' = 'order_id',
     'bucket' = '16',
     'primary-key' = 'order_date,order_id',
     'deletion-vectors.enabled' = 'true'
   );
   ```
   
   2. insert some record
   ```
   INSERT INTO ai_bidding_paimon_dev.main.test VALUES
   ('order_001', 1.0, '2025-10-10')
   ```
   
   3. try to use `expire_partitions`
   ```
   CALL sys.expire_partitions(
       table => 'main.test', 
       expiration_time => '1 d',
       timestamp_formatter => 'yyyy-MM-dd',
       timestamp_pattern => '$order_date',
       expire_strategy => 'values-time'
   )
   ```
   
   ### What doesn't meet your expectations?
   
   Result will be `No expired partitions.`
   ```
   WARN PartitionValuesTimeExpireStrategy: Can't extract datetime from 
partition order_date:20371.
   ```
   But I think the `expire_partitions` procedure should be type-aware. It 
should correctly interpret the value of a DATE partition column and compare it 
with the expiration time.
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to