Ganesha S created SPARK-59244:
---------------------------------

             Summary: Wrap foldable path-expression evaluation in JSON path 
function builders to emit a clean analysis error
                 Key: SPARK-59244
                 URL: https://issues.apache.org/jira/browse/SPARK-59244
             Project: Spark
          Issue Type: Sub-task
          Components: SQL
    Affects Versions: 4.4.0
            Reporter: Ganesha S


`JsonPathExpressionBuilder.build` calls `pathExpr.eval()` on the foldable path 
argument during resolution without catching failures. A foldable-but-throwing 
path expression, e.g. json_value('{}', raise_error('x')), surfaces the raw 
runtime exception instead of a clean path/argument analysis error. Ordinary 
constant paths (string literals, concat(...)) are unaffected, and this mirrors 
`Extract.createExpr`, so it is low-priority hardening.

The fix is to wrap the eval() and re-throw as an invalid-argument 
AnalysisException naming path.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to