[VL][TEST] Cover Parquet row-group sizing from Hadoop conf - #12969
felipepessoto wants to merge 7 commits into
Conversation
….block.size Adds VeloxParquetRowGroupSuite to pin down why Delta's DeletionVectorsWithPredicatePushdownSuite aborts under Gluten (its beforeAll writes 1M rows with parquet.block.size=2MB on the Hadoop conf and asserts >1 row group, but Gluten produces a single row group). Three native-write cases (~8MB of int64, checkNativeWrite asserts the write offloads to ColumnarWriteFilesExec): - default 128MB block size -> exactly 1 row group (the Delta-failure scenario); - spark.gluten.sql.columnar.parquet.write.blockSize=1MB -> multiple row groups (the native writer honors its own conf and CAN split); - parquet.block.size=1MB set on the runtime Hadoop conf (Delta's mechanism) -> still 1 row group (it does not reach the native writer). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ts desired behavior) Flip the third case from characterizing the bug (asserting a single row group) to reproducing it: it now asserts the DESIRED behavior (> 1 row group), so it FAILS today (parquet.block.size on the runtime Hadoop conf does not reach Gluten's native writer -> single row group) and will turn green once that config is plumbed through to the native writer. The default-block-size and Gluten-conf cases remain green controls. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…roupSuite - Wrap the runtime `spark.sparkContext.hadoopConfiguration` access with `// scalastyle:off/on hadoopconfiguration` (its documented escape hatch); the reproduction test must mutate the runtime Hadoop conf on purpose. - Reflow the header scaladoc to satisfy spotless/scalafmt (wrapMaxColumn=100). Verified locally: `spotless:check` and `scalastyle:check` both pass on backends-velox. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PR CI showed the plain-Parquet cases in VeloxParquetRowGroupSuite all pass: a plain `INSERT OVERWRITE DIRECTORY ... USING PARQUET` write DOES honor `parquet.block.size` set on the runtime Hadoop conf. So the Delta `DeletionVectorsWithPredicatePushdownSuite` abort is not a generic native-writer problem -- it is specific to the Delta write path. Adds VeloxDeltaParquetRowGroupSuite: writes a 1M-row Delta table with `parquet.block.size` set on the same conf object Delta uses (`spark.sparkContext.hadoopConfiguration`) and asserts the data file has more than one row group. This is expected to FAIL today (single row group), reproducing the abort; the deletion-vectors variant matches the original suite. Also corrects the now-stale comments in VeloxParquetRowGroupSuite (the runtime Hadoop-conf block size does reach the native writer for plain Parquet writes). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
org.apache.spark.util.Utils is private[spark] and this suite is in package org.apache.gluten.execution, so it cannot be referenced here (it also cascaded into an ambiguous `.sum`). Replace Utils.tryWithResource with a plain try/finally and make the row-group count explicitly Int. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…roupSuite Move scalastyle:off marker before withTempPath lambda to cover the entire hadoopConfiguration access on line 113.
90eb817 to
244efe6
Compare
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Closing this draft as superseded by #13036 and #13058. The investigation and green CI here confirmed that #13036 and #13058 address the affected Delta fixtures deterministically with scoped native row-count limits and validate the resulting downstream tests in the full Delta Spark UT pipeline. The additional 1M-row regression suites in this PR are no longer necessary. |
What changes are proposed in this pull request?
Adds focused Velox Parquet row-group coverage for
parquet.block.sizeset on Spark's runtime Hadoop configuration, matching the configuration channel used by Delta'sDeletionVectorsWithPredicatePushdownSuitesetup.The plain Parquet suite establishes two controls for a single-partition, 1M-row
int64write through the native Velox writer:hadoopConfiguration.set("parquet.block.size", 1 MiB in bytes)produces multiple row groups.The Delta suite applies the same runtime Hadoop configuration to writes with and without deletion vectors. Each test now first asserts that exactly one Parquet data file was produced, then asserts that file contains multiple row groups. This prevents multiple output files from being mistaken for multiple row groups.
backends-velox/src-delta/testis activated only by Maven'sdeltaprofile. The focused validation therefore uses-Pdeltatogether with the Velox, Spark, and Scala profiles soVeloxDeltaParquetRowGroupSuiteis compiled and selected explicitly.The earlier draft also tested
spark.gluten.sql.columnar.parquet.write.blockSize. Even when configured as the valid capacity string1MB, the current writer injection parses it to bytes and re-emits unitlessparquet.block.size=1048576, which Velox rejects as an invalid capacity string. That separate production behavior was removed from this test-only patch so it cannot mask the runtime-Hadoop-conf coverage with a setup failure.How was this patch tested?
Using the repository's focused runner with Spark 3.5, Scala 2.12, Velox, and Delta profiles:
All three focused tests passed. The two Delta tests were each discovered and executed as one selected test under
-Pdelta; there are no intentional failures remaining on Spark 3.5.Also checked the two changed files with the repository Spotless configuration and current CI license-header checker. A local Spark 4.1 compile was attempted, but this Windows worktree materializes
src-delta40symlinks as text files, so Scala compilation stops on those existing checkout artifacts; CI remains the authoritative Spark 4.1 validation.Was this patch authored or co-authored using generative AI tooling?
Generated-by: GitHub Copilot App (GPT-5.6 Sol)