You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "shrirangmhalgi (via GitHub)" <gi...@apache.org> on 2026/06/17 05:57:49 UTC
Re: [PR] [SPARK-57445][SQL] Fix PushVariantIntoScan exception semantics. [spark]
shrirangmhalgi commented on code in PR #56505:
URL: https://github.com/apache/spark/pull/56505#discussion_r3425894251
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/V2ScanRelationPushDown.scala:
##########
@@ -427,6 +427,10 @@ object V2ScanRelationPushDown extends Rule[LogicalPlan] with PredicateHelper {
// If no variant columns remain after collection, return original plan
if (variants.mapping.forall(_._2.isEmpty)) return originalPlan
+ // Cast-error deferral needs reader support for synthetic companion fields. If a scan only
+ // supports plain variant extraction pushdown, leave the plan untouched while deferral is on.
+ if (variants.deferCastErrorEnabled && !builder.supportsDeferCastError()) return originalPlan
Review Comment:
The early return here disables ALL variant pushdown when the scan doesn't support deferral - including non-strict accesses (`try_variant_get`, plain variant reads) that don't need companion support. Could we limit this to plans that actually contain strict-cast extractions? Non-strict pushdowns are independently safe.
--
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