Skip to content

[DNM][VL] Take Arrow out of the bundle for Spark 4.x and drop dead arrow-dataset - #12737

Draft
jackylee-ch wants to merge 1 commit into
apache:mainfrom
jackylee-ch:arrow-unbundle-dnm
Draft

[DNM][VL] Take Arrow out of the bundle for Spark 4.x and drop dead arrow-dataset#12737
jackylee-ch wants to merge 1 commit into
apache:mainfrom
jackylee-ch:arrow-unbundle-dnm

Conversation

@jackylee-ch

@jackylee-ch jackylee-ch commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Test-only, two independent parts.

1) Spark 4.x uses the Arrow that Spark itself ships. Two new properties drive it:

property 3.3/3.4/3.5 4.0/4.1
arrow.deps.scope compile provided
spark.arrow.exclusion.groupId org.apache.arrow none

The second parameterizes the <exclusion> groupId on the Spark dependencies in dependencyManagement, so those exclusions stop matching and Spark's own Arrow flows through transitively — including into the gluten-ut test classpath, which provided alone cannot reach.

arrow.version now matches what each Spark actually ships: spark-4.0 → 18.1.0, spark-4.1 → 18.3.0. Spark 3.3/3.4/3.5 keep 15.0.0 at compile, unchanged.

package/pom.xml needs no change: under provided the Arrow artifacts never enter the shade artifactSet, so the org.apache.arrow relocation is a no-op on 4.x while still applying on 3.x.

2) Drops arrow-dataset. ArrowNativeMemoryPool / ArrowReservationListener were its only main-source users and have had no callers since #12130 removed the Arrow-CSV scan path. The three tests under backends-velox/.../fs/ that used it exercise Arrow's own FileSystemDatasetFactory, not gluten code.

bundle before after
spark-4.1 138.6 MB 56.4 MB compressed (600.6 → 299.6 uncompressed)
spark-3.5 138.6 MB 68.6 MB compressed

Arrow left in the spark-4.1 bundle: arrow-c-data only — 35 classes + 0.9 MB of libarrow_cdata_jni. Spark does not ship arrow-c-data, and its JNI symbols bind to the original package names, so it can be neither provided nor relocated.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude claude-opus-4.7

@github-actions github-actions Bot added CORE works for Gluten Core VELOX labels Aug 10, 2026
@jackylee-ch jackylee-ch changed the title [DNM][VL] Unbundle Arrow memory/vector and drop the org.apache.arrow relocation [DNM][VL] Take Arrow out of the bundle for Spark 4.x and drop dead arrow-dataset Aug 10, 2026
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

…row-dataset

Test-only, two independent parts.

1) Spark 4.x uses the Arrow that Spark itself ships, instead of gluten
   bundling its own copy. Two new properties drive it:

     arrow.deps.scope             compile  -> provided  (spark-4.0 / 4.1)
     spark.arrow.exclusion.groupId org.apache.arrow -> none

   The second one parameterizes the `<exclusion>` groupId on the Spark
   dependencies in dependencyManagement, so those exclusions stop matching and
   Spark's own Arrow flows through transitively - including into the gluten-ut
   test classpath, which is what `provided` alone cannot do.

   arrow.version now matches what each Spark actually ships:
     spark-4.0 -> 18.1.0, spark-4.1 -> 18.3.0.
   Spark 3.3 / 3.4 / 3.5 keep 15.0.0 at `compile` scope, unchanged.

   package/pom.xml needs no change: under `provided` the Arrow artifacts never
   enter the shade artifactSet, so the org.apache.arrow relocation becomes a
   no-op on Spark 4.x while still applying on 3.x.

2) Drops arrow-dataset. `ArrowNativeMemoryPool` and `ArrowReservationListener`
   were its only main-source users and have had no callers since apache#12130 removed
   the Arrow-CSV scan path. The three tests under backends-velox .../fs/ that
   used it exercise Arrow's own FileSystemDatasetFactory, not gluten code.

Bundle size:
  spark-4.1  138.6 MB -> 56.4 MB compressed (600.6 -> 299.6 uncompressed)
  spark-3.5  138.6 MB -> 68.6 MB compressed
Arrow left in the spark-4.1 bundle: arrow-c-data only, 35 classes plus 0.9 MB
of libarrow_cdata_jni - Spark does not ship arrow-c-data and its JNI symbols
bind to the original package names, so it cannot be provided or relocated.

Generated-by: Claude claude-opus-4.7
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BUILD CORE works for Gluten Core VELOX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant