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/01 06:29:36 UTC

[GitHub] [spark] MaxGekk commented on a diff in pull request #38448: [SPARK-40975][SQL] Rename the error class `_LEGACY_ERROR_TEMP_0021` to `UNSUPPORTED_TYPED_LITERAL`

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


##########
sql/core/src/test/resources/sql-tests/results/literals.sql.out:
##########
@@ -442,9 +442,10 @@ struct<>
 -- !query output
 org.apache.spark.sql.catalyst.parser.ParseException
 {
-  "errorClass" : "_LEGACY_ERROR_TEMP_0021",
+  "errorClass" : "UNSUPPORTED_TYPED_LITERAL",
   "messageParameters" : {
-    "valueType" : "GEO"
+    "supportedTypes" : "\"DATE\", \"TIMESTAMP_NTZ\", \"TIMESTAMP_LTZ\", \"TIMESTAMP\", \"INTERVAL\", \"X\"",

Review Comment:
   It depends on implementation, and we might support more in the future. Having the list in the source code can give the following benefits:
   1. More likely, devs will not forget to update the list in source code.
   2. If the list will be in the JSON file, tech editors might forget to edit it or accidentally modify it.
   3. The list of parameters might be formatted in different ways ( as a foldable or drop-down list) by frontend tools. 



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