You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/10/22 11:38:06 UTC

[GitHub] [spark] panbingkun opened a new pull request, #38350: [SPARK-40752][SQL] Migrate type check failures of misc expressions onto error classes

panbingkun opened a new pull request, #38350:
URL: https://github.com/apache/spark/pull/38350

   ### What changes were proposed in this pull request?
   
   
   ### Why are the changes needed?
   
   
   ### Does this PR introduce _any_ user-facing change?
   
   
   ### How was this patch tested?
   


-- 
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] AmplabJenkins commented on pull request #38350: [WIP][SPARK-40752][SQL] Migrate type check failures of misc expressions onto error classes

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on PR #38350:
URL: https://github.com/apache/spark/pull/38350#issuecomment-1287931775

   Can one of the admins verify this patch?


-- 
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 #38350: [SPARK-40752][SQL] Migrate type check failures of misc expressions onto error classes

Posted by GitBox <gi...@apache.org>.
MaxGekk closed pull request #38350: [SPARK-40752][SQL] Migrate type check failures of misc expressions onto error classes
URL: https://github.com/apache/spark/pull/38350


-- 
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 #38350: [WIP][SPARK-40752][SQL] Migrate type check failures of misc expressions onto error classes

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on PR #38350:
URL: https://github.com/apache/spark/pull/38350#issuecomment-1290021018

   @panbingkun Please, fix the coding style issue:
   ```
   [error] /home/runner/work/spark/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/xml/xpath.scala:21:82: Unused import
   [error] import org.apache.spark.sql.catalyst.analysis.TypeCheckResult.{DataTypeMismatch, TypeCheckFailure}
   ```


-- 
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 a diff in pull request #38350: [SPARK-40752][SQL] Migrate type check failures of misc expressions onto error classes

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on code in PR #38350:
URL: https://github.com/apache/spark/pull/38350#discussion_r1008092467


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/SortOrder.scala:
##########
@@ -72,7 +74,11 @@ case class SortOrder(
     if (RowOrdering.isOrderable(dataType)) {
       TypeCheckResult.TypeCheckSuccess
     } else {
-      TypeCheckResult.TypeCheckFailure(s"cannot sort data type ${dataType.catalogString}")
+      DataTypeMismatch(
+        errorSubClass = "UNSUPPORTED_INPUT_TYPE",

Review Comment:
   Could you re-use the existing error class `INVALID_ORDERING_TYPE`. Just call `TypeUtils.checkForOrderingExpr(...)` here.



-- 
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 #38350: [SPARK-40752][SQL] Migrate type check failures of misc expressions onto error classes

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on PR #38350:
URL: https://github.com/apache/spark/pull/38350#issuecomment-1295031180

   @panbingkun Please, remove duplicate items in PR's description:
   ```
   - 1.Add new UT
   - 2.Update existed UT
   - 3.Pass GA.
   ```
   to
   ```
   1. Add new UT
   2. Update existed UT
   3. Pass GA.
   ```


-- 
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] panbingkun commented on a diff in pull request #38350: [SPARK-40752][SQL] Migrate type check failures of misc expressions onto error classes

Posted by GitBox <gi...@apache.org>.
panbingkun commented on code in PR #38350:
URL: https://github.com/apache/spark/pull/38350#discussion_r1008152723


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/SortOrder.scala:
##########
@@ -72,7 +74,11 @@ case class SortOrder(
     if (RowOrdering.isOrderable(dataType)) {
       TypeCheckResult.TypeCheckSuccess
     } else {
-      TypeCheckResult.TypeCheckFailure(s"cannot sort data type ${dataType.catalogString}")
+      DataTypeMismatch(
+        errorSubClass = "UNSUPPORTED_INPUT_TYPE",

Review Comment:
   Done



-- 
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 #38350: [SPARK-40752][SQL] Migrate type check failures of misc expressions onto error classes

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on PR #38350:
URL: https://github.com/apache/spark/pull/38350#issuecomment-1295009404

   @panbingkun
   This pr **replace** TypeCheckFailure -> This pr **replaces** TypeCheckFailure


-- 
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 #38350: [SPARK-40752][SQL] Migrate type check failures of misc expressions onto error classes

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on PR #38350:
URL: https://github.com/apache/spark/pull/38350#issuecomment-1295866404

   +1, LGTM. Merging to master.
   Thank you, @panbingkun.


-- 
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] panbingkun commented on pull request #38350: [SPARK-40752][SQL] Migrate type check failures of misc expressions onto error classes

Posted by GitBox <gi...@apache.org>.
panbingkun commented on PR #38350:
URL: https://github.com/apache/spark/pull/38350#issuecomment-1295838557

   > @panbingkun This pr **replace** TypeCheckFailure -> This pr **replaces** TypeCheckFailure
   
   Done.


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