JingsongLi commented on PR #8423:
URL: https://github.com/apache/paimon/pull/8423#issuecomment-4891301847

   I found one remaining issue in the chain-table lookup read path.
   
   `LookupFileStoreTable.newStreamScan()` now correctly delegates chain-table 
scans to the wrapped table, so the bootstrap phase can produce `ChainSplit`s 
from `ChainTableStreamScan`. However, `LookupFileStoreTable.newRead()` still 
selects the reader based on `lookupScanMode`. If the outer/main chain table 
options make `TableScanUtils.supportCompactDiffStreamingReading(table)` return 
true, `lookupScanMode` becomes `COMPACT_DELTA_MONITOR` and `newRead()` returns 
`LookupCompactDiffRead`.
   
   That reader only handles `DataSplit` as the full-load path; for any other 
split it delegates to `IncrementalCompactDiffSplitRead`, which casts the split 
to `IncrementalSplit`. Therefore a bootstrap `ChainSplit` from the chain-table 
scan can fail with a `ClassCastException`.
   
   Could we make chain-table lookup always delegate `newRead()` to 
`wrapped.newRead()` (or otherwise prevent chain-table lookup from using 
`COMPACT_DELTA_MONITOR`), and add a regression test for a chain table whose 
outer/main table options would select compact-diff lookup mode while the delta 
branch remains `DEDUPLICATE`?


-- 
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