You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR is going to refactor the existing exceptions in our code base, so that they are well organized and queryable. This commit refactor the first 20 error messages.
To handle compilation and error class handling, there are two more classes created:
1. The DeltaThrowable: this is used as the based interface of delta code and contains all necessary implementation for error message framework. With its help, the compilation error of OSS Delta caused by outdated Apache Spark can be avoided.
2. The DeltaThrowableHelper: This is used to pick the error class template from JSON files. It handles all exceptions' message for Delta.
Thus, there are 2 JSON files we read:
1. error-classes.json: it stores the error classes for exceptions inside Apache Spark code base. It will be maintained by the Apache Spark community.
2. delta-error-classes.json: it stores the error classes for exceptions inside our Delta code base. This is maintained by Delta Lake.
Note:
0. The error-classes.json and delta-error-classes.json are not allowed to include same error class.
1. Test cases for all error classes are covered.
2. No duplicate error classes in Delta
4. No error classes are shared by Delta and Spark
5. Delta error classes are correctly formatted
6. Delta message format invariants
GitOrigin-RevId: cff83f531faeaa97391f8debad7e8dbe7f18f632
"message" : [ "%s is not a Delta table. %s is only supported for Delta tables." ],
16
+
"sqlState" : "0A000"
17
+
},
18
+
"FAILED_CHECKPOINT" : {
19
+
"message" : [ "Cannot rename %s to %s" ]
20
+
},
21
+
"INVALID_CHARACTERS_IN_COLUMN_NAME" : {
22
+
"message" : [ "Attribute name \"%s\" contains invalid character(s) among \" ,;{}()\\\\n\\\\t=\". Please use alias to rename it." ],
23
+
"sqlState" : "42000"
24
+
},
25
+
"INVALID_COPY_ENCRYPTION" : {
26
+
"message" : [ "Invalid %s. COPY INTO source %s." ],
27
+
"sqlState" : "42000"
28
+
},
29
+
"INVALID_GENERATED_COLUMN_REFERENCES" : {
30
+
"message" : [ "A generated column cannot use a non-existent column or another generated column" ],
31
+
"sqlState" : "42000"
32
+
},
33
+
"MERGE_INCOMPATIBLE_DECIMAL_TYPE" : {
34
+
"message" : [ "Failed to merge decimal types with incompatible %s" ],
35
+
"sqlState" : "22005"
36
+
},
37
+
"MISSING_DELTA_TABLE" : {
38
+
"message" : [ "%s is not a Delta table." ],
39
+
"sqlState" : "42000"
40
+
},
41
+
"MISSING_NOT_NULL_COLUMN_VALUE" : {
42
+
"message" : [ "Column %s, which has a NOT NULL constraint, is missing from the data being written into the table." ],
43
+
"sqlState" : "42000"
44
+
},
45
+
"MISSING_SET_COLUMN" : {
46
+
"message" : [ "SET column %s not found given columns: %s." ],
47
+
"sqlState" : "42000"
48
+
},
49
+
"UNSUPPORTED_COLUMN_MAPPING_CONVERT_TO_DELTA" : {
50
+
"message" : [ "The configuration '%s' cannot be set to `%s` when using CONVERT TO DELTA." ],
51
+
"sqlState" : "0A000"
52
+
},
53
+
"UNSUPPORTED_COLUMN_MAPPING_MODE_CHANGE" : {
54
+
"message" : [ "Changing column mapping mode from '%s' to '%s' is not supported." ],
55
+
"sqlState" : "0A000"
56
+
},
57
+
"UNSUPPORTED_COLUMN_MAPPING_PROTOCOL" : {
58
+
"message" : [ "", "Your current table protocol version does not support changing column mapping modes", "using %s.", "", "Required Delta protocol version for column mapping:", "%s", "Your table's current Delta protocol version:", "%s", "", "Please upgrade your table's protocol version using ALTER TABLE SET TBLPROPERTIES and try again.", "", "" ],
59
+
"sqlState" : "0A000"
60
+
},
61
+
"UNSUPPORTED_COLUMN_MAPPING_SCHEMA_CHANGE" : {
62
+
"message" : [ "", "Schema change is detected:", "", "old schema:", "%s", "", "new schema:", "%s", "", "Schema changes are not allowed during the change of column mapping mode.", "", "" ],
63
+
"sqlState" : "0A000"
64
+
},
65
+
"UNSUPPORTED_COLUMN_MAPPING_WRITE" : {
66
+
"message" : [ "Writing data with column mapping mode is not supported." ],
"message" : [ "Manifest generation is not supported for tables that leverage column mapping, as external readers cannot read these Delta tables. See Databricks documentation for more details." ],
71
+
"sqlState" : "0A000"
72
+
},
73
+
"UNSUPPORTED_NESTED_COLUMN_IN_BLOOM_FILTER" : {
74
+
"message" : [ "Creating a bloom filer index on a nested column is currently unsupported: %s" ],
0 commit comments