You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "srielau (via GitHub)" <gi...@apache.org> on 2023/04/04 16:23:28 UTC

[GitHub] [spark] srielau commented on a diff in pull request #40641: [SPARK-43011][SQL] `array_insert` should fail with 0 index

srielau commented on code in PR #40641:
URL: https://github.com/apache/spark/pull/40641#discussion_r1157492500


##########
core/src/main/resources/error/error-classes.json:
##########
@@ -542,6 +542,12 @@
     ],
     "sqlState" : "22003"
   },
+  "ARRAY_INSERT_BY_INDEX_ZERO" : {
+    "message" : [
+      "The index 0 is invalid. An index shall be either < 0 or > 0 (the first element has index 1)."
+    ],
+    "sqlState" : "22003"

Review Comment:
   Sounds good. We need to start hardening the error classes, though. They are documented API.
   
   



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