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


##########
sql/connect/server/src/test/scala/org/apache/spark/sql/connect/pipelines/PythonPipelineSuite.scala:
##########
@@ -1084,6 +1084,74 @@ class PythonPipelineSuite
         
ColumnSelection.ExcludeColumns(Seq(UnqualifiedColumnName("timestamp")))))
   }
 
+  test(
+    "AutoCDC API: ignore_null_updates=True is forwarded as an all-columns 
ignore-null " +
+      "selection") {
+    val flow = buildAutoCdcFlow("""
+        |@dp.table
+        |def src():
+        |  return spark.readStream.format("rate").load()
+        |
+        |dp.create_streaming_table("target")
+        |
+        |dp.create_auto_cdc_flow(
+        |    target = "target",
+        |    source = "src",
+        |    keys = ["value"],
+        |    sequence_by = "timestamp",
+        |    ignore_null_updates = True,
+        |)
+        |""".stripMargin)
+
+    // "All columns" is an ExcludeColumns selection with an empty list.
+    assert(
+      
flow.changeArgs.ignoreNullSelection.contains(ColumnSelection.ExcludeColumns(Seq.empty)))
+  }
+
+  test("AutoCDC API: ignore_null_updates_column_list is forwarded as 
IncludeColumns") {
+    val flow = buildAutoCdcFlow("""
+        |@dp.table
+        |def src():
+        |  return spark.readStream.format("rate").load()
+        |
+        |dp.create_streaming_table("target")
+        |
+        |dp.create_auto_cdc_flow(
+        |    target = "target",
+        |    source = "src",
+        |    keys = ["value"],
+        |    sequence_by = "timestamp",
+        |    ignore_null_updates_column_list = ["value"],

Review Comment:
    is also the key, but graph resolution rejects key columns in an ignore-null 
selection. Because  does not resolve the graph, this test passes with an 
unusable configuration. Could we use a non-key payload column and resolve or 
execute the graph?



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