wangyum opened a new pull request, #39851:
URL: https://github.com/apache/spark/pull/39851
### What changes were proposed in this pull request?
This PR adds the expression to data type check error message.
Before This PR:
```
requirement failed: All input types must be the same except nullable,
containsNull, valueContainsNull flags. The input types found are
DecimalType(30,2)
DecimalType(35,2).
```
After this PR:
```
requirement failed: All input types must be the same except nullable,
containsNull, valueContainsNull flags. The expression is: CASE WHEN
upper(TAX_STATE#472) IN (UK,EU) THEN bround((((QTY#507 * ITEM_PRICE#506) +
coalesce(ITEM_SALES_TAX_AMT#510, 0.00)) / QTY#507), 2) ELSE cast(ITEM_PRICE#506
as decimal(35,2)) END. The input types found are
DecimalType(30,2)
DecimalType(35,2).
```
### Why are the changes needed?
Enhance error message.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Manual testing.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]