paimon icon indicating copy to clipboard operation
paimon copied to clipboard

[Bug] Preserve rawConvertible=true on PrimaryKeySortedIndexResult fallback splits

Open tzphh opened this issue 13 hours ago • 0 comments

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

  1. Create a primary-key table with deletion-vectors.enabled = true and a B-Tree / scalar sorted index.
  2. Plan a scan via PrimaryKeyBatchScan on a rawConvertible == true DataSplit containing an uncovered file (or trigger the invalid row-position fallback at PrimaryKeySortedIndexResult.java:75).
  3. Inspect DataSplit.rawConvertible() / convertToRawFiles() on the fallback split returned by PrimaryKeySortedIndexResult.

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!

tzphh avatar Dec 04 '26 06:12 tzphh