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/14 08:41:15 UTC

[GitHub] [spark] MaxGekk commented on a diff in pull request #38650: [SPARK-41135][SQL] Rename `UNSUPPORTED_EMPTY_LOCATION` to `INVALID_EMPTY_LOCATION`

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


##########
core/src/main/resources/error/error-classes.json:
##########
@@ -616,6 +616,11 @@
     ],
     "sqlState" : "42000"
   },
+  "INVALID_EMPTY_LOCATION" : {
+    "message" : [
+      "A specified location cannot be empty."

Review Comment:
   This still confuses me. The location path doesn't contain any data/files, or it is an empty string, or it is null. Looking at:
   ```scala
         if (StringUtils.isEmpty(location)) {
           throw QueryExecutionErrors.unsupportedEmptyLocationError()
         }
   ```
   and at `StringUtils.isEmpty`:
   ```scala
       public static boolean isEmpty(final CharSequence cs) {
           return cs == null || cs.length() == 0;
       }
   ```
   the error is about the path string, not data.
   
   @itholic Could you make the error more precise, and rename `QueryExecutionErrors.unsupportedEmptyLocationError`, please.



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