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


##########
core/src/main/resources/error/error-classes.json:
##########
@@ -668,6 +668,24 @@
       }
     }
   },
+  "LOCATION_ALREADY_EXISTS" : {
+    "message" : [
+      "Cannot create the location <location> because it already exists.",
+      "Choose a different path or remove the existing location."

Review Comment:
   Location and table are different levels of abstractions. And this advise are 
about resolving the issue on different levels. The main message in the main 
error class tells users about the location in a filesystem - remove the 
location if it was created in a filesystem using some fs tools behind of Spark, 
for example. The sub-class messages focus on more specific problem, and tell 
users how to solve the issue on the table name level.
   
   > with more advise seems weird
   
   If we can advise something that can potentially solve user's issue even the 
chance is low, we should do that, I believe.
   
   Probably, the advise in this particular case is trivial but I added it 
because I thought the main error class **can be used alone** w/ linking to a 
managed table. 



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