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


##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -3439,6 +3439,12 @@
     },
     "sqlState" : "22023"
   },
+  "MALFORMED_RECORD_IN_SCHEMA_INFERENCE" : {

Review Comment:
   The error condition is pretty much related to JSON. Let's reflect this in 
its name.
   
   Also the record might be a correct JSON record but has unexpected type.



##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -3439,6 +3439,12 @@
     },
     "sqlState" : "22023"
   },
+  "MALFORMED_RECORD_IN_SCHEMA_INFERENCE" : {
+    "message" : [
+      "Malformed records are detected in schema inference. Parse Mode: 
<failFastMode>. Reasons: Failed to infer a common schema. Struct types are 
expected, but <dataType> was found."

Review Comment:
   ```suggestion
         "Detected an invalid type of a JSON record while inferring a common 
schema in the mode <failFastMode>. Expected a STRUCT type, but found 
<invalidType>."
   ```



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