From 184e813a582bf8323cb0c541c604edf8de4b84ce Mon Sep 17 00:00:00 2001 From: Gengliang Wang Date: Tue, 16 Jun 2026 03:58:34 +0000 Subject: [PATCH] [SPARK-55617][SQL][FOLLOWUP] Correct VariantGet @since to 4.3.0 and expand its class doc Addresses a review comment on #54394: VariantGet was marked `@since 4.1.0`, but the API ships in 4.3.0 (branch-4.x, and master 5.0.0). Update `@since` to 4.3.0 and expand the minimal class Javadoc to describe the expression (the connector-facing form of variant_get / try_variant_get, produced by V2ExpressionBuilder for DSv2 pushdown). Co-authored-by: Isaac --- .../spark/sql/connector/expressions/VariantGet.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sql/catalyst/src/main/java/org/apache/spark/sql/connector/expressions/VariantGet.java b/sql/catalyst/src/main/java/org/apache/spark/sql/connector/expressions/VariantGet.java index 35904fdf82288..b2eb71c89f7bd 100644 --- a/sql/catalyst/src/main/java/org/apache/spark/sql/connector/expressions/VariantGet.java +++ b/sql/catalyst/src/main/java/org/apache/spark/sql/connector/expressions/VariantGet.java @@ -24,9 +24,14 @@ import org.apache.spark.sql.types.DataType; /** - * Variant get expression. + * A DSv2 connector expression that extracts a value from a variant column. It reads the value at + * the JSON {@code path} from the variant {@code child} and casts it to {@code targetType}. This is + * the connector-facing form of the {@code variant_get} / {@code try_variant_get} SQL functions: + * {@link #failOnError()} selects between them (throw vs. return null on a cast failure), and + * {@link #timeZoneId()} binds the time zone used for timestamp casts. {@code V2ExpressionBuilder} + * produces it so data sources can push variant extractions down (for example into filters). * - * @since 4.1.0 + * @since 4.3.0 */ @Evolving public class VariantGet extends ExpressionWithToString {