You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "wangyum (via GitHub)" <gi...@apache.org> on 2023/02/01 13:41:54 UTC

[GitHub] [spark] wangyum opened a new pull request, #39851: [MINOR][SQL] Enhance data type check error message

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: 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


[GitHub] [spark] wangyum commented on pull request #39851: [MINOR][SQL] Enhance data type check error message

Posted by "wangyum (via GitHub)" <gi...@apache.org>.
wangyum commented on PR #39851:
URL: https://github.com/apache/spark/pull/39851#issuecomment-1413417050

   It is an user-facing error.


-- 
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


[GitHub] [spark] wangyum commented on pull request #39851: [MINOR][SQL] Enhance data type check error message

Posted by "wangyum (via GitHub)" <gi...@apache.org>.
wangyum commented on PR #39851:
URL: https://github.com/apache/spark/pull/39851#issuecomment-1412983190

   cc @gengliangwang 


-- 
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


[GitHub] [spark] MaxGekk commented on pull request #39851: [MINOR][SQL] Enhance data type check error message

Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk commented on PR #39851:
URL: https://github.com/apache/spark/pull/39851#issuecomment-1415232248

   +1, LGTM. Merging to master/3.4.
   Thank you, @wangyum.


-- 
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


[GitHub] [spark] MaxGekk commented on pull request #39851: [MINOR][SQL] Enhance data type check error message

Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk commented on PR #39851:
URL: https://github.com/apache/spark/pull/39851#issuecomment-1415231355

   I opened the sub-task https://issues.apache.org/jira/browse/SPARK-42332


-- 
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


[GitHub] [spark] gengliangwang commented on pull request #39851: [MINOR][SQL] Enhance data type check error message

Posted by "gengliangwang (via GitHub)" <gi...@apache.org>.
gengliangwang commented on PR #39851:
URL: https://github.com/apache/spark/pull/39851#issuecomment-1413009676

   @wangyum shall we have a test case for this one? We can throw AnalysisException instead of using `require`


-- 
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


[GitHub] [spark] MaxGekk closed pull request #39851: [MINOR][SQL] Enhance data type check error message

Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk closed pull request #39851: [MINOR][SQL] Enhance data type check error message
URL: https://github.com/apache/spark/pull/39851


-- 
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


[GitHub] [spark] MaxGekk commented on pull request #39851: [MINOR][SQL] Enhance data type check error message

Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk commented on PR #39851:
URL: https://github.com/apache/spark/pull/39851#issuecomment-1413427098

   > It is an user-facing error.
   
   Let's merge this require w/ message improvement and open a sub-task in https://issues.apache.org/jira/browse/SPARK-37935 to convert it to a Spark exception w/ an error class.
   


-- 
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