gengliangwang commented on code in PR #51236:
URL: https://github.com/apache/spark/pull/51236#discussion_r2162681990


##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -90,6 +90,24 @@
     ],
     "sqlState" : "42000"
   },
+  "APPROX_TOP_K_MAX_ITEMS_TRACKED_LESS_THAN_K": {
+    "message": [
+      "`approx_top_k` must have `maxItemsTracked` greater than or equal to 
`k`, but got `maxItemsTracked` = <maxItemsTracked> and `k` = <k>."
+    ],
+    "sqlState" : "22023"
+  },
+  "APPROX_TOP_K_NON_POSITIVE_ARG" : {
+    "message" : [
+      "The value of <argName> in `approx_top_k` must be a positive integer, 
but got <argValue>."
+    ],
+    "sqlState" : "22023"
+  },
+  "APPROX_TOP_K_NULL_ARG" : {
+    "message" : [
+      "The value of <argName> in `approx_top_k` cannot be NULL."
+    ],
+    "sqlState" : "22004"

Review Comment:
   why 22004?
   ```
       "22024": {
           "description": "unterminated C string",
           "origin": "SQL/Foundation",
           "standard": "Y",
           "usedBy": ["SQL/Foundation", "PostgreSQL", "DB2", "Redshift", 
"Oracle"]
       },
   ```



##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -90,6 +90,24 @@
     ],
     "sqlState" : "42000"
   },
+  "APPROX_TOP_K_MAX_ITEMS_TRACKED_LESS_THAN_K": {
+    "message": [
+      "`approx_top_k` must have `maxItemsTracked` greater than or equal to 
`k`, but got `maxItemsTracked` = <maxItemsTracked> and `k` = <k>."
+    ],
+    "sqlState" : "22023"
+  },
+  "APPROX_TOP_K_NON_POSITIVE_ARG" : {
+    "message" : [
+      "The value of <argName> in `approx_top_k` must be a positive integer, 
but got <argValue>."
+    ],
+    "sqlState" : "22023"
+  },
+  "APPROX_TOP_K_NULL_ARG" : {
+    "message" : [
+      "The value of <argName> in `approx_top_k` cannot be NULL."
+    ],
+    "sqlState" : "22004"

Review Comment:
   why 22004?
   ```
       "22024": {
           "description": "unterminated C string",
           "origin": "SQL/Foundation",
           "standard": "Y",
           "usedBy": ["SQL/Foundation", "PostgreSQL", "DB2", "Redshift", 
"Oracle"]
       },
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to