Skip to content

Commit f5ed490

Browse files
authored
refactor: remove unused error variants (#4078)
# Description we were not using some error variants, so getting rid of them. there are a lot of very detailed CDC errors where I am unsure someone would do something by checking these variants and a message would suffice, but thats for another day. Signed-off-by: Robert Pack <robstar.pack@gmail.com>
1 parent fdae288 commit f5ed490

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

crates/core/src/errors.rs

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -56,28 +56,10 @@ pub enum DeltaTableError {
5656
json_err: serde_json::error::Error,
5757
},
5858

59-
/// Error returned when the log contains invalid stats JSON.
60-
#[error("Invalid JSON in invariant expression, line=`{line}`, err=`{json_err}`")]
61-
InvalidInvariantJson {
62-
/// JSON error details returned when parsing the invariant expression JSON.
63-
json_err: serde_json::error::Error,
64-
/// Invariant expression.
65-
line: String,
66-
},
67-
6859
/// Error returned when the DeltaTable has an invalid version.
6960
#[error("Invalid table version: {0}")]
7061
InvalidVersion(i64),
7162

72-
/// Error returned when the DeltaTable has no data files.
73-
#[error("Corrupted table, cannot read data file {}: {}", .path, .source)]
74-
MissingDataFile {
75-
/// Source error details returned when the DeltaTable has no data files.
76-
source: std::io::Error,
77-
/// The Path used of the DeltaTable
78-
path: String,
79-
},
80-
8163
/// Error returned when the datetime string is invalid for a conversion.
8264
#[error("Invalid datetime string: {}", .source)]
8365
InvalidDateTimeString {
@@ -101,10 +83,6 @@ pub enum DeltaTableError {
10183
#[error("No schema found, please make sure table is loaded.")]
10284
NoSchema,
10385

104-
/// Error returned when no partition was found in the DeltaTable.
105-
#[error("No partitions found, please make sure table is partitioned.")]
106-
LoadPartitions,
107-
10886
/// Error returned when writes are attempted with data that doesn't match the schema of the
10987
/// table
11088
#[error("Data does not match the schema or partitions of the table: {}", msg)]
@@ -127,13 +105,6 @@ pub enum DeltaTableError {
127105
partition_filter: String,
128106
},
129107

130-
/// Error returned when a partition filter uses a nonpartitioned column.
131-
#[error("Tried to filter partitions on non-partitioned columns: {:#?}", .nonpartitioned_columns)]
132-
ColumnsNotPartitioned {
133-
/// The columns used in the partition filter that is not partitioned
134-
nonpartitioned_columns: Vec<String>,
135-
},
136-
137108
/// Error returned when a line from log record is invalid.
138109
#[error("Failed to read line from log record")]
139110
Io {
@@ -184,13 +155,6 @@ pub enum DeltaTableError {
184155
json_err: serde_json::error::Error,
185156
},
186157

187-
/// Generic Delta Table error
188-
#[error("Schema JSON serialization error: {json_err}")]
189-
SerializeSchemaJson {
190-
/// JSON serialization error
191-
json_err: serde_json::error::Error,
192-
},
193-
194158
/// Generic Delta Table error
195159
#[error("Generic DeltaTable error: {0}")]
196160
Generic(String),

0 commit comments

Comments
 (0)