Remove inaccessible and unused AccessibleArrowColumnVector - #15075
Conversation
Greptile SummaryThis PR removes the
Confidence Score: 5/5Safe to merge — removes dead code that was provably unreachable at runtime; no functional paths are altered. Both changed files make purely subtractive changes to dead-code paths. The case _ error branch in arrowColumnarCopy already covered any non-ArrowColumnVector input, and a grep of the full repo confirms zero remaining references to AccessibleArrowColumnVector. The remaining Arrow and non-Arrow copy paths in HostColumnarToGpu are unchanged. Files Needing Attention: No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[HostToGpuCoalesceIterator.initNewBatch] -->|useArrowCopyOpt && numCols > 0 && arrowTypesSupported| B{column 0 type?}
B -->|ArrowColumnVector| C[GpuArrowColumnarBatchBuilder]
B -->|anything else| D[GpuColumnarBatchBuilder]
E[arrowColumnarCopy] -->|cv match| F{ColumnVector type?}
F -->|ArrowColumnVector| G[getArrowValueVector via reflection]
F -->|anything else| H[throw IllegalStateException]
style B fill:#d4edda,stroke:#28a745
style F fill:#d4edda,stroke:#28a745
Reviews (3): Last reviewed commit: "Merge branch 'main' into remove-unused-a..." | Re-trigger Greptile |
b1c9258 to
c96159c
Compare
|
NOTE: release/26.08 has been created from main. Please retarget your PR to release/26.08 if it should be included in the release. |
AccessibleArrowColumnVector was originally added for a customer that planned to write their own DataSource V2, but it is no longer used. Due to the shimming and parallel-world packaging, the class is not actually accessible at runtime, so the code branches referencing it in HostColumnarToGpu are dead. Remove the class and its references. Fixes NVIDIA#11863 Signed-off-by: Ching Wei Kang <ckang53@wisc.edu> Co-authored-by: Cursor <cursoragent@cursor.com>
c96159c to
ad9b5a8
Compare
|
LGTM |
|
build |
Summary
Fixes #11863
AccessibleArrowColumnVectorwas originally added (in #1622) for a customer who planned to write their own DataSource V2. That customer is not using it, and as noted in the issue, the class is not actually accessible at runtime due to the shimming / parallel-world packaging. The branches that reference it are therefore dead code.Changes
sql-plugin/src/main/java/org/apache/spark/sql/vectorized/rapids/AccessibleArrowColumnVector.java.HostColumnarToGpu.scala:case av: AccessibleArrowColumnVectorbranch inarrowColumnarCopy(thecase _already throws for any other vector type)isInstanceOf[AccessibleArrowColumnVector]check when selecting the Arrow batch builderTesting
AccessibleArrowColumnVectorin the repo (verified via grep).Made with Cursor