Copilot commented on code in PR #13129:
URL: https://github.com/apache/gluten/pull/13129#discussion_r4285407140
##########
.github/workflows/util/delta-spark-ut/apply-delta-test-patches.sh:
##########
@@ -82,43 +83,31 @@ cherry_pick_delta_fix
46bd45d57eadd7e528002a0ae7bd36ce5a456eca "#7104 (ScanRepor
cherry_pick_delta_fix 959e00e15f41f56afc1c9bb95d160c55c6dc7068 "#7105 (9 more
test suites)"
echo "::endgroup::"
-echo "::group::Capping DeltaParquetFileFormat fixture row groups by row count"
-# DeltaParquetFileFormatSuite generates one 20,000-row Parquet file and sets a
-# 50 KiB block size to ensure that it contains multiple row groups. Velox sizes
-# row groups by buffered bytes after writing each input batch. Because this
-# fixture arrives in one batch, lowering the byte threshold cannot split it.
-# Scope Gluten's native row-count limit around the fixture write so Arrow
splits
-# the 20,000 rows deterministically while keeping the native write path
enabled.
+echo "::group::Applying temporary Delta test patches"
+# Keep local patches after the cherry-picks, which require an unmodified
worktree
+# for the files they touch. Patch paths are relative to this script, not Delta.
+for patch in \
+ cdf-pushed-filter-assertions.patch \
+ parquet-fixture-row-groups.patch \
+ dv-predicate-pushdown-row-groups.patch \
+ dv-2b-row-fail-fast.patch; do
+ echo "Applying $patch"
+ if ! git -C "$DELTA_DIR" apply "$PATCH_DIR/$patch"; then
+ echo "ERROR: Delta test patch '$patch' did not apply." >&2
+ echo "The patch expects Delta v4.2.0 test sources;" \
+ "ref '${DELTA_REF}' must remain source-compatible." >&2
Review Comment:
The failure message hard-codes “Delta v4.2.0” even though the script takes
`DELTA_REF` as input; this can mislead debugging when CI bumps the ref (or when
running locally against a different tag/commit). Consider rephrasing to avoid a
fixed version (or include both the “known-tested” version and the actual
`${DELTA_REF}` being patched) so failures are easier to interpret.
##########
.github/workflows/util/delta-spark-ut/patches/cdf-pushed-filter-assertions.patch:
##########
@@ -0,0 +1,46 @@
+Subject: [PATCH] Match Delta CDF pushed-filter assertions to Gluten
+
+Gluten's file scans omit Spark's handled-filter '*' marker
+(apache/gluten#12753). They also quote special-character column names,
+unlike Delta's vanilla CDF scan.
+
+Adjust only these three shared assertions, covering 13 concrete test cases;
+keep their predicate, column-pruning, and result checks intact. Remove this
+workaround when #12753 is fixed or Delta no longer requires the starred form.
+
+diff --git
a/spark/src/test/scala/org/apache/spark/sql/delta/DeltaCDCSuite.scala
b/spark/src/test/scala/org/apache/spark/sql/delta/DeltaCDCSuite.scala
+--- a/spark/src/test/scala/org/apache/spark/sql/delta/DeltaCDCSuite.scala
++++ b/spark/src/test/scala/org/apache/spark/sql/delta/DeltaCDCSuite.scala
+@@ -1045,7 +1045,7 @@ class DeltaCDCScalaSuite extends DeltaCDCSuiteBase {
+ .withColumn("_change_type", lit("insert")))
+ }
+ assert(plans.map(_.executedPlan).toString
+- .contains("PushedFilters: [*IsNotNull(id), *LessThan(id,5)]"))
++ .contains("PushedFilters: [IsNotNull(id), LessThan(id,5)]"))
+ }
+ }
+
+diff --git
a/spark/src/test/scala/org/apache/spark/sql/delta/DeltaCDCSQLSuite.scala
b/spark/src/test/scala/org/apache/spark/sql/delta/DeltaCDCSQLSuite.scala
+--- a/spark/src/test/scala/org/apache/spark/sql/delta/DeltaCDCSQLSuite.scala
++++ b/spark/src/test/scala/org/apache/spark/sql/delta/DeltaCDCSQLSuite.scala
+@@ -145,7 +145,7 @@ class DeltaCDCSQLSuite extends DeltaCDCSuiteBase with
DeltaColumnMappingTestUtils {
+ .withColumn("_change_type", lit("insert")))
+ }
+ assert(plans.map(_.executedPlan).toString
+- .contains("PushedFilters: [*IsNotNull(id), *LessThan(id,5)]"))
++ .contains("PushedFilters: [IsNotNull(id), LessThan(id,5)]"))
+ }
+ }
+
+diff --git
a/spark/src/test/scala/org/apache/spark/sql/delta/DeltaCDCColumnMappingSuite.scala
b/spark/src/test/scala/org/apache/spark/sql/delta/DeltaCDCColumnMappingSuite.scala
+---
a/spark/src/test/scala/org/apache/spark/sql/delta/DeltaCDCColumnMappingSuite.scala
++++
b/spark/src/test/scala/org/apache/spark/sql/delta/DeltaCDCColumnMappingSuite.scala
+@@ -668,7 +668,7 @@ trait DeltaCDCColumnMappingSuiteBase extends
DeltaColumnMappingSelectedTestMixin {
+ .withColumn("_change_type", lit("insert")))
+ }
+ assert(plans.map(_.executedPlan).toString
+- .contains("PushedFilters: [*IsNotNull(id with space), *LessThan(id
with space,5)]"))
++ .contains("PushedFilters: [IsNotNull(`id with space`), LessThan(`id
with space`,5)]"))
Review Comment:
The workaround still relies on an exact `toString.contains(...)` substring
match, which is brittle to benign plan-string changes (whitespace, filter
ordering, extra qualifiers, or future Spark/Delta formatting tweaks). To keep
the semantic assertion (pushdown happened) while reducing churn, consider
matching more loosely (e.g., assert presence of `PushedFilters:` plus the
individual filter names/operands, or normalize whitespace/quoting before
comparison) rather than requiring the full exact bracketed list string.
--
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]