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

   ### Search before asking
   
   - [x] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   
   ### Paimon version
   
   paimon-1.2.0
   
   ### Compute Engine
   
   Spark-3.3.1
   
   ### Minimal reproduce step
   
   In Spark:
   
   CREATE TABLE test.sequence_bug (
       id1 BIGINT,
       id2 BIGINT,
       name STRING,
       op_ts STRING,
       updated_ts BIGINT
   )
   USING paimon
   TBLPROPERTIES (
       'primary-key' = 'id1, id2',
       'sequence.field' = 'op_ts, updated_ts'
   );This DDL fails with:
   
   > Caused by: java.lang.IllegalArgumentException: Sequence field: ' 
updated_ts' can not be found in table schema.
   
   Because `sequence.field` is parsed as `["op_ts", " updated_ts"]` (with a 
leading space), 
   while `primary-key = 'id1, id2'` works as expected.
   
   <img width="1466" height="679" alt="Image" 
src="https://github.com/user-attachments/assets/9794edae-5e71-4cdd-af09-b95493c1e4a7";
 />
   
   ### What doesn't meet your expectations?
   
   I expect that `sequence.field` behaves the same as `primary-key` when 
parsing comma-separated field lists.
   This is because `sequence.field` does not trim spaces after commas, so the 
parsed field name is `" updated_ts"` instead of `"updated_ts"`.
   I expect `sequence.field` to trim spaces and accept `'op_ts, updated_ts'` 
just like `primary-key` does.
   
   ### 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: [email protected]

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

Reply via email to