AnishMahto commented on code in PR #56686:
URL: https://github.com/apache/spark/pull/56686#discussion_r3521267662
##########
sql/pipelines/src/test/scala/org/apache/spark/sql/pipelines/graph/AutoCdcScd1AuxiliaryTableDurabilitySuite.scala:
##########
@@ -181,6 +181,31 @@ class AutoCdcScd1AuxiliaryTableDurabilitySuite
assert(getAuxTableKeyColumnNames(target = "target") == Seq("region", "id"))
}
+ test("a dry run resolves and validates the graph without provisioning the
auxiliary " +
+ "table") {
+ val session = spark
+ import session.implicits._
+
+ spark.sql(
+ s"CREATE TABLE $catalog.$namespace.target " +
+ s"(id INT NOT NULL, version BIGINT NOT NULL, $cdcMetadataDdl)"
+ )
+
+ val stream = MemoryStream[(Int, Long)]
+ stream.addData((1, 1L))
+ val ctx = singleAutoCdcFlowPipeline(
+ flowName = "auto_cdc_flow",
+ target = "target",
+ sourceDf = stream.toDF().toDF("id", "version"),
+ keys = Seq("id"),
+ sequencing = functions.col("version"))
+
+ val updateCtx = TestPipelineUpdateContext(spark, ctx.toDataflowGraph,
storageRoot)
+ updateCtx.pipelineExecution.dryRunPipeline()
+
+ assert(spark.catalog.tableExists(auxTableNameFor("target")))
Review Comment:
Yeah oops, and test was failing desirably. Fixed!
--
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]