NarekDW commented on code in PR #41018:
URL: https://github.com/apache/spark/pull/41018#discussion_r1186642349


##########
core/src/main/resources/error/error-classes.json:
##########
@@ -235,6 +235,11 @@
     ],
     "sqlState" : "22018"
   },
+  "CORRUPTED_TABLE_PROPERTY" : {
+    "message" : [
+      "Cannot read table property <key> as it's corrupted.<details>"

Review Comment:
   It might be renamed to `INSUFFICIENT_TABLE_PROPERTY` with sub classes like 
this:
   ```json
   "INSUFFICIENT_TABLE_PROPERTY": {
     "message" : [
       "Can't find table property:"
     ],
     "subClass" : {
       "TABLE_PROPERTY_MISSING" : {
         "message" : [
           "<key>."
         ]
       },
       "TABLE_PROPERTY_PART_MISSING": {
         "message" : [
           "<key>, <totalAmountOfParts> parts are expected..."
         ]
       }
     }
   }
   ```
   
   Error message examples:
   - ```[INSUFFICIENT_TABLE_PROPERTY.TABLE_PROPERTY_MISSING] Can't find table 
property: `spark`.`sql`.`sources`.`schema`.```
   - ```[INSUFFICIENT_TABLE_PROPERTY.TABLE_PROPERTY_PART_MISSING] Can't find 
table property: `spark`.`sql`.`sources`.`schema`.`part`.`1`, 3 parts are 
expected...```
   
   What do you think? Is it fine?



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