discivigour opened a new pull request, #8711:
URL: https://github.com/apache/paimon/pull/8711
### Purpose
Fix `ClassCastException` failures when query authorization wraps planned
`DataSplit`s in `QueryAuthSplit` and downstream split consumers assume every
planned split is a raw `DataSplit`.
The failures are reachable in two paths:
- Cross-partition index bootstrap reads partition, bucket, and data-file
metadata by directly casting planned splits to `DataSplit`.
- Fallback branch planning directly casts main-branch splits to `DataSplit`,
and its main reader previously forwarded the fallback wrapper instead of the
wrapped query-auth split.
This change:
- adds a one-layer `QueryAuthSplit.unwrap` helper for metadata access;
- unwraps query-auth splits only when `IndexBootstrap` needs `DataSplit`
metadata, while preserving the original split for the authorized reader;
- lets fallback planning wrap any `Split` and removes only the fallback
wrapper before dispatching to the main or fallback reader; and
- adds regression coverage for index bootstrap and fallback planning,
serialization, reading, and column masking.
### Tests
```shell
mvn -pl paimon-core -am \
-DfailIfNoTests=false \
-DwildcardSuites=none \
'-Dtest=IndexBootstrapTest#testQueryAuthSplit,FallbackReadFileStoreTableTest#testPlanAndReadWithQueryAuthSplit'
\
test
```
Result: 2 tests passed. Checkstyle and Spotless checks also passed for the
reactor modules.
--
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]