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/11/20 16:50:37 UTC

[GitHub] [spark] MaxGekk commented on a diff in pull request #38725: [SPARK-41182][SQL] Assign a name to the error class _LEGACY_ERROR_TEMP_1102

MaxGekk commented on code in PR #38725:
URL: https://github.com/apache/spark/pull/38725#discussion_r1027319785


##########
core/src/main/resources/error/error-classes.json:
##########
@@ -1326,6 +1326,11 @@
       "grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup"
     ]
   },
+  "UNSUPPORTED_LITERAL_FOR_SOURCE_TYPE" : {
+    "message" : [
+      "Literals of the type <field> are currently not supported for the <sourceDataType> type."

Review Comment:
   Looking at where the error comes from:
   1. https://github.com/apache/spark/blob/51e4c2cc55aa01f07b28b1cd807b553f8729075d/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/intervalExpressions.scala#L159
   2. https://github.com/apache/spark/blob/b14da8b1b65d9f00f49fab87f738715089bc43e8/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala#L2795
   
   , the error message and error class name confuse slightly. The error is mostly about an extract field. How about error class name:
   `INVALID_EXTRACT_FIELD`
   Also cc @srielau



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