yihua opened a new pull request, #18293: URL: https://github.com/apache/hudi/pull/18293
### Describe the issue this Pull Request addresses The `SparkAdapter` trait and its per-version implementations accumulated methods that either have no callers or are implemented with byte-identical bodies in every version adapter, so each change to them is maintained and reviewed up to six times. ### Summary and Changelog Refreshed against current master; now covers Spark 3.3 through 4.2 (the original revision predated the Spark 4.1/4.2 modules). - Remove two methods with no callers anywhere in the repository: `createInterpretedPredicate` and `sqlExecutionWithNewExecutionId`. - Give `SparkAdapter` default implementations for methods whose bodies were byte-identical across all six version adapters: `isColumnarBatchRow`, `createCatalystMetadataForMetaField`, `extractDeleteCondition`, `convertStorageLevelToString`. - Pull family-identical bodies into the base adapters: `injectTableFunctions`, `injectScalarFunctions`, `injectPlannerStrategies`, `createLanceFileReader` into `BaseSpark3Adapter`/`BaseSpark4Adapter`; additionally `stopSparkContext`, `isLegacyBehaviorPolicy`, `isTimestampNTZType`, `getRebaseSpec`, and `isHoodieTable` into `BaseSpark4Adapter`. - `Spark3_3Adapter` keeps its `createLanceFileReader` override returning `None` (no Lance support on Spark 3.3); all other removals are pure de-duplication with no behavior change. - `injectTableFunctions` becomes abstract on the trait: the no-op default was dead since both base adapters override it. ### Impact No functional change; the adapter surface shrinks and shared bodies are compiled once per family instead of once per version. ### Risk Level low. Caller absence for the two removed methods verified repo-wide; every pulled-up body verified byte-identical across the copies it replaces; CI compiles all six Spark profiles. ### Documentation Update none ### 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 (pure de-duplication; existing tests exercise the adapters on every Spark CI leg) -- 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]
