wangyong9999 opened a new pull request, #284: URL: https://github.com/apache/paimon-cpp/pull/284
### Purpose Linked issue: N/A. Fixed-bucket append scans currently retain other buckets even when equality predicates fully specify the bucket key. Reuse `BucketSelectConverter` to derive the bucket and prune matching-layout manifest entries before data files are read. Keep the inferred bucket separate from the explicit bucket filter: using a global filter computed from the current bucket count could drop historical files written with a different layout. Inferred pruning applies only when the file schema ID and total bucket count match the scan. Other layouts retain existing filtering behavior, and an explicit bucket filter takes precedence. Incomplete/non-equality predicates and bucket-unaware tables retain existing behavior. ### Tests - 37 focused unit tests passed, including six new cases for string lookup, explicit filters, incomplete/non-equality predicates, bucket-unaware tables, different bucket counts and historical schemas. - 81 integration tests passed. The new write/commit/scan/read test routes STRING and BINARY keys through the public bucket calculator into four buckets, verifies that every bucket's file stats match the lookup, and checks that inference retains only the correct bucket and row. It runs across Parquet/ORC, prefetch and manifest-cache settings. - Regression checks: all eight new integration cases fail against the unmodified production source; both historical-layout unit cases fail if the inferred bucket is applied as a global filter. Restored the final implementation and reran the passing tests. ```bash cmake --build build-reuse --target paimon-core-test paimon-scan-and-read-inte-test -j 12 build-reuse/release/paimon-core-test --gtest_filter='AppendBucketPruningTest.*:AppendOnlyFileStoreScanTest.*:BucketSelectConverterTest.*:KeyValueFileStoreScanTest.*' build-reuse/release/paimon-scan-and-read-inte-test --gtest_filter='*Append*:*TestWithPKBucketSelectByPredicate*' pre-commit run --all-files git diff --check ``` Final incremental build passed with GCC 8, C++17 and default `-Wall`, without warnings. All pre-commit hooks passed using pre-commit 3.8.0 on Python 3.11. Full test suite, aarch64, downstream RPC E2E and latency benchmarks were not run. ### API and Format No public API, protocol or storage format changes. Only append scan planning changes for eligible files; explicit bucket filtering retains its existing semantics. ### Documentation Added bucket-pruning behavior and historical-layout fallback to `docs/source/api/scan.rst`. ### Generative AI tooling Generated-by: Codex (GPT-6) -- 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]
