szehon-ho opened a new pull request, #56255: URL: https://github.com/apache/spark/pull/56255
### What changes were proposed in this pull request? Follow-up to #56160 (SPARK-57113) addressing post-merge review comments and reducing duplication in the AutoCDC flow code and its test suites. No behavior change. `sql/pipelines/.../graph/FlowExecution.scala`: - Hoist the `org.json4s` imports out of `serializeKeyColumnNames` / `parseKeyColumnNames` to the top of the file, per Spark's import conventions. - Factor the duplicated AutoCDC key-field resolution shared by `auxiliaryKeyColumnNames` and `validateNoAutoCdcKeyDrift` into a single `expectedAuxiliaryKeyFields` helper. - Import `scala.collection.mutable` instead of using a fully-qualified inline reference. Tests: - Add a shared `singleAutoCdcFlowPipeline` helper to `AutoCdcGraphExecutionTestMixin` and use it across the AutoCDC SCD1 E2E suites (`AutoCdcScd1KeyDriftSuite`, `AutoCdcScd1MultiPipelineSuite`, `AutoCdcScd1AuxiliaryTableDurabilitySuite`, `AutoCdcScd1SchemaEvolutionSuite`), removing the repeated single-table/single-flow `TestGraphRegistrationContext` registration boilerplate. ### Why are the changes needed? Addresses non-blocking review feedback left on #56160 and reduces duplication in the AutoCDC flow code and its tests, improving readability and maintainability. The net diff removes ~300 lines. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pure refactor with no behavior change, covered by the existing AutoCDC suites: - `AutoCdcAuxiliaryTableSuite` - `AutoCdcScd1KeyDriftSuite` - `AutoCdcScd1MultiPipelineSuite` - `AutoCdcScd1AuxiliaryTableDurabilitySuite` - `AutoCdcScd1SchemaEvolutionSuite` ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Cursor (Claude Opus 4.8) -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
