Copilot commented on code in PR #13129:
URL: https://github.com/apache/gluten/pull/13129#discussion_r4285222658


##########
.github/workflows/util/delta-spark-ut/apply-delta-test-patches.sh:
##########
@@ -34,6 +34,7 @@ fi
 
 DELTA_REF="$1"
 DELTA_DIR="$2"
+PATCH_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/patches"

Review Comment:
   `BASH_SOURCE` is bash-specific. Since this line is newly introduced, please 
ensure this script is always executed with bash (shebang and any caller uses 
`bash ...`), otherwise `PATCH_DIR` resolution can break under `sh`/dash. If you 
need POSIX `sh` compatibility, switch to a `$0`-based approach (noting it 
behaves differently if the script is sourced).



##########
.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
+    exit 1
+  fi

Review Comment:
   When a patch file is missing (e.g., path typo, packaging issue), `git apply` 
fails with a less-specific error that can be confusing in CI logs. Consider 
adding an explicit existence/readability check for `"$PATCH_DIR/$patch"` and 
emitting a targeted error (e.g., “patch file not found in repo checkout”) 
before attempting `git apply`.



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