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

   ### Search before asking
   
   - [x] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   ### Paimon version
   
   master
   
   ### Compute Engine
   
   any
   
   ### Minimal reproduce step
   
   Create a primary-key table with `file.format = vortex`, write, and read (or 
let lookup compaction rewrite). The first key-value deserialization throws:
   
   ```
   java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length N
       at 
org.apache.paimon.data.columnar.VectorizedColumnBatch.getLong(VectorizedColumnBatch.java:85)
       at 
org.apache.paimon.reader.RecordReaderIterator.<init>(RecordReaderIterator.java:40)
       at 
org.apache.paimon.mergetree.compact.ChangelogMergeTreeRewriter.rewriteOrProduceChangelog(...)
   ```
   
   ### What doesn't meet your expectations?
   
   `VortexRecordsReader.isRowTrackingField` classifies any projected field 
named `_SEQUENCE_NUMBER` (or `_ROW_ID`) as a row-tracking field to be 
synthesized, and maps its projection index to -1. But `_SEQUENCE_NUMBER` is 
also the primary-key file format's physical sequence column, present in every 
KV data file and projected by every KV read — so all vortex reads of 
primary-key tables crash. Synthesis should be reserved for fields the file does 
not store physically.
   
   ### 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