JingsongLi commented on code in PR #11432:
URL: https://github.com/apache/paimon/pull/11432#discussion_r4691456503
##########
paimon-spark/paimon-spark-common/src/main/scala/org/apache/paimon/spark/commands/PaimonRowLevelCommand.scala:
##########
@@ -84,8 +86,17 @@ trait PaimonRowLevelCommand
}
if (condition != TrueLiteral) {
val filter =
- convertConditionToPaimonPredicate(condition, output, rowType,
ignorePartialFailure = true)
+ convertConditionToPaimonPredicate(
+ condition,
+ relation.output,
+ rowType,
+ ignorePartialFailure = true)
filter.foreach(snapshotReader.withFilter)
+ if (coreOptions.dataEvolutionEnabled()) {
+ PaimonRowLevelCommand
+ .conjunctiveRowIdRange(condition, relation.output ++
relation.metadataOutput)
+ .foreach(range =>
snapshotReader.withRowRanges(Collections.singletonList(range)))
Review Comment:
**[P1] Carry the selected row range through to the reader**
A valid Data Evolution table can have one normal file covering `[0, 1249]`
and two dedicated vector files covering `[0, 999]` and `[1000, 1249]`. I
reproduced this on Spark 3.5 with deletion vectors enabled, a single-partition
`INSERT` of 1,250 rows, and `vector.target-file-size='1 b'`. [Data Evolution
file
layout](https://paimon.apache.org/docs/master/multimodal-table/data-evolution-file-layout/#dedicated-files-contained-within-one-normal-range)
`DELETE FROM t WHERE _ROW_ID = 1050` prunes the first vector file here. The
reader receives a plain `DataSplit` and checks the file group before choosing
which columns to read. It compares 250 vector rows with 1,250 normal rows and
fails with `All files in a field merge split should have the same row count.`
The same SQL deletes one row at the PR base (`4dc01acd`).
Please pass the same selected row ranges to the reader, following the
existing `IndexedSplit` path, and add a regression test for a row-ID delete on
this layout. [Existing range-aware read
path](https://github.com/apache/paimon/blob/1de1e24c1655358ab92d5fc7fc88e0b475920f90/paimon-core/src/main/java/org/apache/paimon/globalindex/DataEvolutionBatchScan.java#L349-L354)
--
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]