Max Gekk created SPARK-61196:
--------------------------------

             Summary: Pass the query context to the overflow errors of interval 
add, subtract and negate
                 Key: SPARK-61196
                 URL: https://issues.apache.org/jira/browse/SPARK-61196
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 5.0.0
            Reporter: Max Gekk


The interval overflow errors raised by IntervalMathUtils.addExact, 
subtractExact and negateExact carry no query context, because their callers 
(Add, Subtract and UnaryMinus over ANSI interval types) do not pass one. For 
example, on the same VALUES table in interval.sql.out, the error of `a / 0.5` 
has a queryContext with the fragment `a / 0.5`, while the error of `b + 
interval '1 month'` has none.

Pass the expression's query context through to these errors, as SPARK-60746 
does for the interval divisions, in both the interpreted and the generated code 
paths.

Raised in the review of https://github.com/apache/spark/pull/59956 
(https://github.com/apache/spark/pull/59956#discussion_r4470601385).




--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

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

Reply via email to