szehon-ho commented on code in PR #57625:
URL: https://github.com/apache/spark/pull/57625#discussion_r3677364948


##########
sql/pipelines/src/main/scala/org/apache/spark/sql/pipelines/graph/DatasetManager.scala:
##########
@@ -453,6 +468,12 @@ object DatasetManager extends Logging {
                 targetTableIdentifier = autoCdcSpec.targetTableIdentifier,
                 expectedScdType = autoCdcSpec.expectedScdType
               )
+              AutoCdcAuxiliaryTable.validateNoTrackHistoryDrift(
+                existingAuxiliaryTable = existingAuxiliaryTable,
+                targetTableIdentifier = autoCdcSpec.targetTableIdentifier,
+                expectedTrackHistoryColumnNames = 
autoCdcSpec.expectedTrackHistoryColumnNames,
+                resolver = context.spark.sessionState.conf.resolver
+              )

Review Comment:
   Nit: the `caseSensitiveAnalysis` used to *record* the set comes from 
`inputAutoCdcFlow.df.sparkSession` (`AutoCdcAuxiliaryTable.scala:245`), while 
the `resolver` used to *validate* it comes from `context.spark` here. Can we 
source both from one session? The `val` on `AutoCdcMergeFlow` suggested in the 
other comment would settle the recording side.
   
   Also worth a test: a case-only rename of a source column across runs 
(`value` -> `Value`) is the case that actually exercises this resolver, and 
neither end-to-end test covers it - both vary the casing of the `TRACK HISTORY 
ON` selection, which is normalized away before the comparison.



-- 
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]

Reply via email to