diff --git a/src/mito2/src/error.rs b/src/mito2/src/error.rs index 610955c3aa0f..68a35123ea39 100644 --- a/src/mito2/src/error.rs +++ b/src/mito2/src/error.rs @@ -430,7 +430,7 @@ pub enum Error { #[snafu(display("Failed to build index applier"))] BuildIndexApplier { #[snafu(source)] - error: index::inverted_index::error::Error, + source: index::inverted_index::error::Error, location: Location, }, @@ -486,7 +486,6 @@ impl ErrorExt for Error { | FillDefault { .. } | ConvertColumnDataType { .. } | ColumnNotFound { .. } - | BuildIndexApplier { .. } | InvalidMetadata { .. } => StatusCode::InvalidArguments, RegionMetadataNotFound { .. } | Join { .. } @@ -523,6 +522,7 @@ impl ErrorExt for Error { JsonOptions { .. } => StatusCode::InvalidArguments, EmptyRegionDir { .. } | EmptyManifestDir { .. } => StatusCode::RegionNotFound, ArrowReader { .. } => StatusCode::StorageUnavailable, + BuildIndexApplier { source, .. } => source.status_code(), ConvertValue { source, .. } => source.status_code(), } }