Copilot commented on code in PR #13036:
URL: https://github.com/apache/gluten/pull/13036#discussion_r4032764009
##########
.github/workflows/util/delta-spark-ut/setup-delta.sh:
##########
@@ -172,6 +172,59 @@ 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.
+DPFFS="$DELTA_DIR/spark/src/test/scala/org/apache/spark/sql/delta/DeltaParquetFileFormatSuite.scala"
+if [ ! -f "$DPFFS" ]; then
+ echo "Expected file not found in Delta clone: $DPFFS" >&2
+ echo "The Delta directory layout for ref '${DELTA_REF}' may have changed."
>&2
+ exit 1
+fi
+if ! sed 's/^__BLANK_CONTEXT__$/ /' <<'PATCH' | git -C "$DELTA_DIR" apply -
+diff --git
a/spark/src/test/scala/org/apache/spark/sql/delta/DeltaParquetFileFormatSuite.scala
b/spark/src/test/scala/org/apache/spark/sql/delta/DeltaParquetFileFormatSuite.scala
+---
a/spark/src/test/scala/org/apache/spark/sql/delta/DeltaParquetFileFormatSuite.scala
++++
b/spark/src/test/scala/org/apache/spark/sql/delta/DeltaParquetFileFormatSuite.scala
+@@ -68,9 +68,11 @@ trait DeltaParquetFileFormatSuiteBase
+ protected def generateData(tablePath: String): Unit = {
+ // This is to generate a Parquet file with two row groups
+ hadoopConf().set("parquet.block.size", (1024 * 50).toString)
+__BLANK_CONTEXT__
+ // Keep the number of partitions to 1 to generate a single Parquet data
file
+ val df = Seq.range(0, 20000).toDF().repartition(1)
+- df.write.format("delta").mode("append").save(tablePath)
++ withSQLConf("spark.gluten.sql.native.parquet.write.blockRows" -> "10000")
{
++ df.write.format("delta").mode("append").save(tablePath)
++ }
+__BLANK_CONTEXT__
+ // Set DFS block size to be less than Parquet rowgroup size, to allow
+PATCH
+then
+ echo "ERROR: DeltaParquetFileFormat fixture patch did not apply." >&2
+ echo "The patch expects the Delta v4.2.0 generateData fixture shape;" \
+ "ref '${DELTA_REF}' must remain source-compatible." >&2
+ exit 1
+fi
+ROW_CAP_SCOPES=$(
+ grep -Fxc \
+ ' withSQLConf("spark.gluten.sql.native.parquet.write.blockRows" ->
"10000") {' \
+ "$DPFFS" || true
+)
Review Comment:
This guard only counts the `withSQLConf` line anywhere in the cloned file.
If the upstream fixture is rearranged and an unrelated occurrence remains,
setup can still pass even though `generateData` was not capped, so the claimed
source-drift fail-fast check is not enforced. Validate one complete sequence
tying the 50 KiB `hadoopConf` setting to the 20,000-row `df.write` inside this
scope, rather than counting this standalone line.
--
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]