wenxtao opened a new issue, #5778:
URL: https://github.com/apache/paimon/issues/5778

   ### Search before asking
   
   - [x] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   
   ### Paimon version
   
   v1.0.1
   v1.1.1
   
   ### Compute Engine
   
   Flink SQL
   
   ### Minimal reproduce step
   
   create a primary-key partition table,ensure the  primary-key fields not 
contain all partition fields,and write data to table.
   ```
   -- 1.准备source数据
   CREATE CATALOG my_catalog WITH(
   'type'='paimon',
   'warehouse'='file:/home/data/paimon'
   ):
   USE CATALOG my_catalog;
   CREATE TEMPORARY TABLE source_table (
   id INT,
   product_name STRING,
   price DECIMAL(10, 2),
   category STRING,
   create_time TIMESTAMP
   )WITH (
     'connector' = 'datagen',
     'rows-per-second' =''5',
     'fields.id.kind' = 'sequence'
     'fields.id.start' = '1'
     'fields.id.end' = '1000'
     'fields.product_name.length' = '10'
     'fields.price.min' = '10'
     'fields.price.max' = '1000',
     'fields.category.length' = '3'
   );
   -- 2.创建Paimon目标表
   CREATE TABLE paimon_sink (
     id INT COMMENT 'PK ID'
     product_name STRING COMMENT 'product name',
     price DECIMAL(10, 2) COMMENT 'price',
     category STRING COMMENT 'category',
     create_time TIMESTAMP COMMENT 'create time',
     dt STRING COMMENT 'dt',
     PRIMARY KEY (id,category,create_time) NOT ENFORCED
   ) COMMENT 'product price table'
   PARTITIoNED BY (category,dt);
   -- 3.执行数据写入
   INSERT INTO paimon_sink
   SELECT
     id,
     product_name,
     price,
     category.
     create_time,
     DATE_FORMAT(create_time, 'yyyy-MM-dd') AS dt
   FROM source_table;
   ```
   
   
   ### What doesn't meet your expectations?
   
   the project throw a exception in running, exception message:
   
   
![Image](https://github.com/user-attachments/assets/f2417787-a80e-4bfe-aadb-c431a9910843)
   
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [x] 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: issues-unsubscr...@paimon.apache.org.apache.org

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

Reply via email to