Commit 62bc6c9
committed
[CORE] Unbundle Arrow memory + vector from gluten-velox-bundle
Mark arrow-memory-{core,unsafe,netty} and arrow-vector as scope=provided in
gluten-arrow/pom.xml. They are bundled in Spark's distribution
($SPARK_HOME/jars/ for Spark 3.x; declared in Spark 4.x's pom), so the user's
classpath already has them at runtime — gluten does not need to ship its own
copy.
Effects:
* The gluten-velox bundle no longer ships ANY org.apache.arrow.memory.* or
org.apache.arrow.vector.* classes. The class-shadowing problem from #12225
goes away by construction — there is no gluten-shipped copy left to shadow
the user's vanilla Arrow.
* The org.apache.arrow shade-relocation block in package/pom.xml becomes
redundant and is removed: arrow-memory/vector are no longer in the bundle
to relocate, and arrow-c-data / arrow-dataset (still bundled) were already
excluded from relocation because their JNI binds to the original class
names.
* arrow-c-data and arrow-dataset remain at scope=compile in gluten-arrow —
Spark does NOT ship those, so gluten still bundles them. With the relocation
block gone, their public method signatures naturally bind to the user's
vanilla org.apache.arrow.memory.BufferAllocator / arrow-vector types,
exactly matching what every other Arrow C-Data caller on the classpath
expects.
Compile-classpath touch-ups:
* backends-velox/pom.xml: re-declare arrow-memory-core and arrow-vector at
scope=provided. The transitive route through gluten-arrow no longer carries
them after the scope flip, so backends-velox needs its own provided
declaration to compile.
* gluten-ut/* and backends-clickhouse already declare arrow at provided
scope locally, so they are unaffected.
Caveats:
* Spark 3.5 and earlier do NOT declare arrow-memory/arrow-vector in their
Maven POM (they ship them inside the binary distribution only). gluten
builds against the version pinned in `arrow.version`. Maintainers should
keep `arrow.version` aligned with the lowest-common-denominator Arrow
version across supported Spark distros (DBR 16.4 ships Arrow 12.0.1 with
Spark 3.5; vanilla Spark 3.5.x ships 15.0.0 — the 15.0.0 default here is
fine for vanilla Spark 3.5 but may need a compat profile for DBR/Cloudera
flavors).
* dev/check-arrow-c-shading.sh added in #12226 still passes — the bundle
still contains org/apache/arrow/c/* classes whose method signatures now
reference unshaded org.apache.arrow.memory.* / org.apache.arrow.vector.*
types (which are no longer in the bundle, but resolve at runtime from
Spark's Arrow).
Builds on #12244 (drop the 15.0.0-gluten Arrow version rename). Addresses the
follow-up direction from #12226 discussion: "remove Arrow from the bundled
Gluten Jar and let users rely on Spark's bundled Arrow".1 parent 62da6bf commit 62bc6c9
3 files changed
Lines changed: 37 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
82 | 100 | | |
83 | 101 | | |
84 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
88 | 95 | | |
89 | 96 | | |
90 | 97 | | |
91 | 98 | | |
92 | | - | |
| 99 | + | |
93 | 100 | | |
94 | 101 | | |
95 | 102 | | |
96 | 103 | | |
97 | 104 | | |
98 | | - | |
| 105 | + | |
99 | 106 | | |
100 | 107 | | |
101 | 108 | | |
| |||
111 | 118 | | |
112 | 119 | | |
113 | 120 | | |
| 121 | + | |
114 | 122 | | |
115 | 123 | | |
116 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
143 | 130 | | |
144 | 131 | | |
145 | 132 | | |
| |||
0 commit comments