This is an automated email from the ASF dual-hosted git repository.

uros-b pushed a commit to branch branch-4.x
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-4.x by this push:
     new 5a99fd79e466 [SPARK-57632][SQL] Remove unused method 
addVariantValueVariant in VariantShreddingWriter
5a99fd79e466 is described below

commit 5a99fd79e4665915f913230154d59f5ebe985d49
Author: YangJie <[email protected]>
AuthorDate: Tue Jun 23 23:18:01 2026 +0200

    [SPARK-57632][SQL] Remove unused method addVariantValueVariant in 
VariantShreddingWriter
    
    ### What changes were proposed in this pull request?
    
    This PR removes `VariantShreddingWriter.addVariantValueVariant`, a `private 
static` method that has no callers. It is a one-line delegation to 
`ShreddedResult.addVariantValue`; the live shredding path already calls 
`result.addVariantValue(...)` directly.
    
    ### Why are the changes needed?
    
    Dead code cleanup. The method has been unreferenced since it was first 
added in [SPARK-48898](https://issues.apache.org/jira/browse/SPARK-48898) (`Add 
Variant shredding functions`) - it never had a caller. Removing it keeps 
`VariantShreddingWriter` easier to read.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    No new tests are needed; this only removes unreachable code. Existing 
variant tests still pass.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #56695 from LuciferYang/SPARK-variant-remove-dead-shredding-method.
    
    Authored-by: YangJie <[email protected]>
    Signed-off-by: Uros Bojanic <[email protected]>
    (cherry picked from commit 4d05554999f1aa237c6f8c9b610c866036e31b51)
    Signed-off-by: Uros Bojanic <[email protected]>
---
 .../java/org/apache/spark/types/variant/VariantShreddingWriter.java | 6 ------
 1 file changed, 6 deletions(-)

diff --git 
a/common/variant/src/main/java/org/apache/spark/types/variant/VariantShreddingWriter.java
 
b/common/variant/src/main/java/org/apache/spark/types/variant/VariantShreddingWriter.java
index b7ead0470468..67be54eabd30 100644
--- 
a/common/variant/src/main/java/org/apache/spark/types/variant/VariantShreddingWriter.java
+++ 
b/common/variant/src/main/java/org/apache/spark/types/variant/VariantShreddingWriter.java
@@ -294,10 +294,4 @@ public class VariantShreddingWriter {
     return null;
   }
 
-  // Add the result to the shredding result.
-  private static void addVariantValueVariant(Variant variantResult,
-      VariantSchema schema, ShreddedResult result) {
-    result.addVariantValue(variantResult.getValue());
-  }
-
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to