Davis-Zhang-Onehouse opened a new pull request, #20690: URL: https://github.com/apache/hudi/pull/20690
### Describe the issue this Pull Request addresses issue: #20689 Part of #20683, RFC-118 (#20684). Stacked on #20688: review only the last commit. Until the PRs below it merge, this PR also shows their commits. The cloud incremental sources (S3/GCS events) select objects and read them in `CloudDataFetcher`, and the read is fixed to a columnar Spark datasource scan. The RFC-118 unstructured source parses documents instead, so it needs its own key predicate, partition sizing and read while reusing the selection. ### Summary and Changelog Makes the read step of the cloud incremental sources pluggable. Default behaviour is unchanged. - New `CloudObjectMaterializer` (`objectKeyPredicate`, `partitionCount`, `materialize`): turns the selected cloud objects into rows. - New `ColumnarFileMaterializer`: the default, carrying today's columnar read and byte-based partition sizing. - `CloudDataFetcher`: a new constructor takes a materializer; the existing constructors use `ColumnarFileMaterializer`. Fetching dispatches filter, partition count and read to the materializer. - `CloudObjectsSelectorCommon.generateFilter`: an overload appends the materializer's key predicate; `getPropVal` becomes package-visible for the default materializer. - `CloudObjectMetadata`: an optional ordering token; the two-argument constructor is kept. - Tests: `TestColumnarFileMaterializer` (6) and injected-predicate cases for S3 and GCS in `TestCloudObjectsSelectorCommon`. No code was copied from other projects. ### Impact Adds an extension point for the cloud incremental sources. No existing behaviour or constructor changes. ### Risk Level low: the default path is the existing columnar read behind an interface. Verified on JDK 11 / Spark 3.5 / Scala 2.12: 31 tests (6 `TestColumnarFileMaterializer`, 23 `TestCloudObjectsSelectorCommon`, 2 `TestS3EventsHoodieIncrSource` ingestion tests), checkstyle and RAT pass. The tests run locally; no live S3 or GCS I/O was exercised. ### Documentation Update none (no new config) ### Contributor's checklist - [x] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [x] Enough context is provided in the sections above - [x] Adequate tests were added if applicable -- 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]
