paimon
paimon copied to clipboard
[Bug] Preserve rawConvertible=true on PrimaryKeySortedIndexResult fallback splits
Search before asking
- [x] I searched in the issues and found nothing similar.
Paimon version
master (055fe60215)
Compute Engine
JavaAPI (PrimaryKeyBatchScan / StarRocks)
Minimal reproduce step
- Create a primary-key table with
deletion-vectors.enabled = trueand a B-Tree / scalar sorted index. - Plan a scan via
PrimaryKeyBatchScanon arawConvertible == trueDataSplitcontaining an uncovered file (or trigger the invalid row-position fallback atPrimaryKeySortedIndexResult.java:75). - Inspect
DataSplit.rawConvertible()/convertToRawFiles()on the fallback split returned byPrimaryKeySortedIndexResult.
What doesn't meet your expectations?
Any sourceSplit reaching PrimaryKeySortedIndexResult.java:59-78 is already verified as rawConvertible() == true (line 52).
However, toSingleFileSplit(file) (PrimaryKeySortedIndexResult.java:110) unconditionally hardcodes .rawConvertible(false). Both raw-scan fallback branches (line 61 for !result.isPresent(), line 75 for invalid positions) therefore return rawConvertible = false, breaking convertToRawFiles() and forcing downstream engines (e.g., StarRocks) off native Parquet/ORC readers onto slow merge/JNI readers.
Anything else?
No response
Are you willing to submit a PR?
- [x] I'm willing to submit a PR!