You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "MaxGekk (via GitHub)" <gi...@apache.org> on 2024/08/14 09:52:09 UTC

Re: [PR] [SPARK-49137][SQL][FOLLOWUP] Assign a reasonable error condition, when the Boolean condition in the if statement returns an empty row [spark]

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


##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -125,6 +125,12 @@
     ],
     "sqlState" : "22003"
   },
+  "BOOLEAN_STATEMENT_EMPTY_ROWS" : {
+    "message" : [
+      "Boolean statement <invalidStatement> is invalid. It returns an empty row."

Review Comment:
   Let's make this error text more precise like:
   `Boolean statement <invalidStatement> is invalid. Expected single row with a value of the BOOLEAN type, but got an empty row.`



##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -125,6 +125,12 @@
     ],
     "sqlState" : "22003"
   },
+  "BOOLEAN_STATEMENT_EMPTY_ROWS" : {

Review Comment:
   This name confuses slightly. We got not empty rows but one empty row. Let's correct it.



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