Skip to content

Commit

Permalink
Remove unused error types
Browse files Browse the repository at this point in the history
  • Loading branch information
Jefffrey committed Aug 19, 2024
1 parent a4f636d commit 0560c10
Showing 1 changed file with 0 additions and 71 deletions.
71 changes: 0 additions & 71 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
// under the License.

use std::io;
use std::string::FromUtf8Error;

use arrow::datatypes::DataType as ArrowDataType;
use arrow::datatypes::TimeUnit;
Expand All @@ -25,19 +24,11 @@ use snafu::prelude::*;
use snafu::Location;

use crate::proto;
use crate::proto::r#type::Kind;
use crate::schema::DataType;

#[derive(Debug, Snafu)]
#[snafu(visibility(pub))]
pub enum OrcError {
#[snafu(display("Failed to seek, source: {}", source))]
SeekError {
source: std::io::Error,
#[snafu(implicit)]
location: Location,
},

#[snafu(display("Failed to read, source: {}", source))]
IoError {
source: std::io::Error,
Expand All @@ -51,34 +42,13 @@ pub enum OrcError {
location: Location,
},

#[snafu(display("Invalid input, message: {}", msg))]
InvalidInput {
msg: String,
#[snafu(implicit)]
location: Location,
},

#[snafu(display("Out of spec, message: {}", msg))]
OutOfSpec {
msg: String,
#[snafu(implicit)]
location: Location,
},

#[snafu(display("Error from map builder: {}", source))]
MapBuilder {
source: arrow::error::ArrowError,
#[snafu(implicit)]
location: Location,
},

#[snafu(display("Failed to create new string builder: {}", source))]
StringBuilder {
source: arrow::error::ArrowError,
#[snafu(implicit)]
location: Location,
},

#[snafu(display("Failed to decode float, source: {}", source))]
DecodeFloat {
#[snafu(implicit)]
Expand Down Expand Up @@ -113,34 +83,13 @@ pub enum OrcError {
location: Location,
},

#[snafu(display("unsupported type: {:?}", kind))]
UnsupportedType {
#[snafu(implicit)]
location: Location,
kind: Kind,
},

#[snafu(display("unsupported type variant: {}", msg))]
UnsupportedTypeVariant {
#[snafu(implicit)]
location: Location,
msg: &'static str,
},

#[snafu(display("Field not found: {:?}", name))]
FieldNotFound {
#[snafu(implicit)]
location: Location,
name: String,
},

#[snafu(display("Invalid column : {:?}", name))]
InvalidColumn {
#[snafu(implicit)]
location: Location,
name: String,
},

#[snafu(display(
"Cannot decode ORC type {:?} into Arrow type {:?}",
orc_type,
Expand All @@ -161,26 +110,6 @@ pub enum OrcError {
encoding: proto::column_encoding::Kind,
},

#[snafu(display("Failed to add day to a date"))]
AddDays {
#[snafu(implicit)]
location: Location,
},

#[snafu(display("Invalid utf8, source: {}", source))]
InvalidUft8 {
#[snafu(implicit)]
location: Location,
source: FromUtf8Error,
},

#[snafu(display("Out of bound at: {}", index))]
OutOfBound {
#[snafu(implicit)]
location: Location,
index: usize,
},

#[snafu(display("Failed to convert to record batch: {}", source))]
ConvertRecordBatch {
#[snafu(implicit)]
Expand Down

0 comments on commit 0560c10

Please sign in to comment.