You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@auron.apache.org by "lyne7-sc (via GitHub)" <gi...@apache.org> on 2026/10/19 07:03:48 UTC
[PR] [AURON #2588]Preserve literal parameters during expression fallback [auron]
lyne7-sc opened a new pull request, #2589:
URL: https://github.com/apache/auron/pull/2589
# Which issue does this PR close?
Closes #2588
# Rationale for this change
When exactly one child expression needs fallback, Auron also wraps literal parameters in unevaluable `NativeExprWrapper` objects. Parent expressions that read these constants during conversion can fail to convert, causing unnecessary fallback. In TPC-DS Q2, this makes the entire projection fall back to Spark.
# What changes are included in this PR?
Preserve literal parameters when wrapping child expressions.
# Are there any user-facing changes?
Affected projections can remain native while unsupported child expressions still use JVM fallback. Query results and public APIs are unchanged.
# How was this patch tested?
- Passed `AuronExpressionSuite`, verifying correct results and native projection.
- Verified TPC-DS Q2 results and passed the updated golden plan check.
# Was this patch authored or co-authored using generative AI tooling?
- [x] Yes
- [ ] No
If yes, include: `Generated-by: OpenAI Codex (GPT-6)`
ASF guidance: https://www.apache.org/legal/generative-tooling.html
--
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: commits-unsubscribe@auron.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [AURON #2588] Preserve literal parameters during expression fallback [auron]
Posted by "slfan1989 (via GitHub)" <gi...@apache.org>.
slfan1989 merged PR #2589:
URL: https://github.com/apache/auron/pull/2589
--
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: commits-unsubscribe@auron.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [AURON #2588] Preserve literal parameters during expression fallback [auron]
Posted by "lyne7-sc (via GitHub)" <gi...@apache.org>.
lyne7-sc commented on code in PR #2589:
URL: https://github.com/apache/auron/pull/2589#discussion_r4345690876
##########
spark-extension/src/main/scala/org/apache/spark/sql/auron/NativeConverters.scala:
##########
@@ -355,16 +355,19 @@ object NativeConverters extends Logging {
numInconvertibleChildren match {
case 0 => convertExprWithFallback(sparkExpr, isPruningExpr = false, fallbackToError)
case 1 =>
- val childrenConverted = sparkExpr.mapChildren { child =>
- try {
- val converted =
- convertExprWithFallback(child, isPruningExpr = false, fallbackToError)
- Shims.get.createNativeExprWrapper(converted, child.dataType, child.nullable)
- } catch {
- case _: NotImplementedError =>
- val fallbacked = convertExpr(child)
- Shims.get.createNativeExprWrapper(fallbacked, child.dataType, child.nullable)
- }
+ val childrenConverted = sparkExpr.mapChildren {
+ // Preserve literal parameters when wrapping child expressions.
+ case literal: Literal => literal
+ case child =>
+ try {
+ val converted =
+ convertExprWithFallback(child, isPruningExpr = false, fallbackToError)
+ Shims.get.createNativeExprWrapper(converted, child.dataType, child.nullable)
+ } catch {
+ case _: NotImplementedError =>
+ val fallbacked = convertExpr(child)
+ Shims.get.createNativeExprWrapper(fallbacked, child.dataType, child.nullable)
+ }
}
Review Comment:
Updated the code to preserve literals only after successful conversion. Children that throw `NotImplementedError` continue through the existing fallback path.
--
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: commits-unsubscribe@auron.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [AURON #2588] Preserve literal parameters during expression fallback [auron]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #2589:
URL: https://github.com/apache/auron/pull/2589#discussion_r4337223269
##########
spark-extension/src/main/scala/org/apache/spark/sql/auron/NativeConverters.scala:
##########
@@ -355,16 +355,19 @@ object NativeConverters extends Logging {
numInconvertibleChildren match {
case 0 => convertExprWithFallback(sparkExpr, isPruningExpr = false, fallbackToError)
case 1 =>
- val childrenConverted = sparkExpr.mapChildren { child =>
- try {
- val converted =
- convertExprWithFallback(child, isPruningExpr = false, fallbackToError)
- Shims.get.createNativeExprWrapper(converted, child.dataType, child.nullable)
- } catch {
- case _: NotImplementedError =>
- val fallbacked = convertExpr(child)
- Shims.get.createNativeExprWrapper(fallbacked, child.dataType, child.nullable)
- }
+ val childrenConverted = sparkExpr.mapChildren {
+ // Preserve literal parameters when wrapping child expressions.
+ case literal: Literal => literal
+ case child =>
+ try {
+ val converted =
+ convertExprWithFallback(child, isPruningExpr = false, fallbackToError)
+ Shims.get.createNativeExprWrapper(converted, child.dataType, child.nullable)
+ } catch {
+ case _: NotImplementedError =>
+ val fallbacked = convertExpr(child)
+ Shims.get.createNativeExprWrapper(fallbacked, child.dataType, child.nullable)
+ }
}
Review Comment:
This special-cases all `Literal` children unconditionally. If the *single* inconvertible child happens to be a `Literal` (e.g., a literal type not supported by the Arrow IPC literal serialization), this branch will keep it unwrapped even though `numInconvertibleChildren == 1` was computed based on a failed conversion. That will re-trigger the failure during `convertExprWithFallback(childrenConverted, ...)` and force whole-expression fallback, defeating the intent of single-child fallback.\n\nSuggestion: track the specific inconvertible child during the initial scan (e.g., store the first child that threw `NotImplementedError`), and only preserve `Literal` for children that are *not* that inconvertible child. For the inconvertible child, keep the existing wrapping/fallback behavior.
--
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: commits-unsubscribe@auron.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org