https://delta.io logo
c

Cole MacKenzie

07/14/2023, 10:24 PM
Copy code
fn is_table_already_exists(value: &DeltaTableError) -> bool {
    match value {
        deltalake::DeltaTableError::GenericError { source } => source
            .to_string()
            .eq("A Delta Lake table already exists at that location."),
        _ => false,
    }
}
😬
r

rtyler

07/14/2023, 10:28 PM
I'm actually surprised that enum is not `pub and there's not some visibility upwards for it. The type erasure on the CreateBuilder kind of makes that enum not very helpful
r

Robert

07/17/2023, 7:13 AM
WE have been and still are consolidating some of these errors. specifically we had many different error enums, sometimes raising different errors on the same struct. Basic strategy right now is to make the top level errors more helpful and not expose too many nested error types, "TableAlreadyExists" seems like a good candidate for a top level error variant. Best guess is we will end up after all with two levels of errors though ..