You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "wenxtao (via GitHub)" <gi...@apache.org> on 2025/06/19 10:07:51 UTC

[I] [Bug] In Crosspartition table,KeyPartPartitionKeyExtractor throw exception as Field names must be unique. Found duplicates [paimon]

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-unsubscribe@paimon.apache.org.apache.org

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


Re: [I] [Bug] In Crosspartition table,KeyPartPartitionKeyExtractor throw exception as Field names must be unique. Found duplicates [paimon]

Posted by "wenxtao (via GitHub)" <gi...@apache.org>.
wenxtao commented on issue #5778:
URL: https://github.com/apache/paimon/issues/5778#issuecomment-2987527115

   KeyPartPartitionKeyExtractor会将所有主键字段和分区字段放到一个List里面,并获取到他们的DataField,但是在projectedLogicalRowType里面的校验,会判断这个list是否有同名字段。


-- 
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@paimon.apache.org

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


Re: [I] [Bug] In Crosspartition table,KeyPartPartitionKeyExtractor throw exception as Field names must be unique. Found duplicates [paimon]

Posted by "wenxtao (via GitHub)" <gi...@apache.org>.
wenxtao closed issue #5778: [Bug] In Crosspartition table,KeyPartPartitionKeyExtractor throw exception as Field names must be unique. Found duplicates
URL: https://github.com/apache/paimon/issues/5778


-- 
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@paimon.apache.org

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


Re: [I] [Bug] In Crosspartition table,KeyPartPartitionKeyExtractor throw exception as Field names must be unique. Found duplicates [paimon]

Posted by "wenxtao (via GitHub)" <gi...@apache.org>.
wenxtao commented on issue #5778:
URL: https://github.com/apache/paimon/issues/5778#issuecomment-2989588503

   I see that this problem has already been solved by this merge : https://github.com/apache/paimon/pull/5588


-- 
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@paimon.apache.org

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