You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "bojana-db (via GitHub)" <gi...@apache.org> on 2026/08/03 09:41:23 UTC
Re: [PR] [SPARK-58510][SQL] Make variant path functions error consistently on malformed constant paths across execution modes [spark]
bojana-db commented on code in PR #57682:
URL: https://github.com/apache/spark/pull/57682#discussion_r3702846115
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/variant/VariantExpressionSuite.scala:
##########
@@ -686,6 +686,16 @@ class VariantExpressionSuite extends SparkFunSuite with ExpressionEvalHelper {
// scalastyle:on nonascii
testVariantGet("[1, 2, 3]", "$[2147483647]", IntegerType, null)
+ Seq("variant_get" -> true, "try_variant_get" -> false).foreach {
+ case (name, failOnError) =>
+ checkErrorInExpression[SparkRuntimeException](
+ VariantGet(BoundReference(0, VariantType, nullable = true), Literal(".a"),
+ IntegerType, failOnError),
+ InternalRow(null),
+ "INVALID_VARIANT_GET_PATH",
Review Comment:
Changed the PR title.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org