Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into fix-out-of-date-las…
Browse files Browse the repository at this point in the history
…t-checkpoint
  • Loading branch information
Nick Lanham committed Sep 25, 2024
2 parents a4fc54f + e88ae2d commit c3961c9
Show file tree
Hide file tree
Showing 6 changed files with 523 additions and 239 deletions.
2 changes: 1 addition & 1 deletion acceptance/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use crate::{TestCaseInfo, TestResult};
pub async fn read_golden(path: &Path, _version: Option<&str>) -> DeltaResult<RecordBatch> {
let expected_root = path.join("expected").join("latest").join("table_content");
let store = Arc::new(LocalFileSystem::new_with_prefix(&expected_root)?);
let files = store.list(None).try_collect::<Vec<_>>().await?;
let files: Vec<_> = store.list(None).try_collect().await?;
let mut batches = vec![];
let mut schema = None;
for meta in files.into_iter() {
Expand Down
2 changes: 2 additions & 0 deletions ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ pub enum KernelError {
InvalidStructDataError,
InternalError,
InvalidExpression,
InvalidLogPath,
}

impl From<Error> for KernelError {
Expand Down Expand Up @@ -374,6 +375,7 @@ impl From<Error> for KernelError {
backtrace: _,
} => Self::from(*source),
Error::InvalidExpressionEvaluation(_) => KernelError::InvalidExpression,
Error::InvalidLogPath(_) => KernelError::InvalidLogPath,
}
}
}
Expand Down
7 changes: 7 additions & 0 deletions kernel/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ pub enum Error {
/// Expressions did not parse or evaluate correctly
#[error("Invalid expression evaluation: {0}")]
InvalidExpressionEvaluation(String),

/// Unable to parse the name of a log path
#[error("Invalid log path: {0}")]
InvalidLogPath(String),
}

// Convenience constructors for Error types that take a String argument
Expand Down Expand Up @@ -203,6 +207,9 @@ impl Error {
pub fn invalid_expression(msg: impl ToString) -> Self {
Self::InvalidExpressionEvaluation(msg.to_string())
}
pub(crate) fn invalid_log_path(msg: impl ToString) -> Self {
Self::InvalidLogPath(msg.to_string())
}

pub fn internal_error(msg: impl ToString) -> Self {
Self::InternalError(msg.to_string()).with_backtrace()
Expand Down
5 changes: 5 additions & 0 deletions kernel/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@ pub mod engine_data;
pub mod error;
pub mod expressions;
pub mod features;

#[cfg(feature = "developer-visibility")]
pub mod path;
#[cfg(not(feature = "developer-visibility"))]
pub(crate) mod path;

pub mod scan;
pub mod schema;
pub mod snapshot;
Expand Down
Loading

0 comments on commit c3961c9

Please sign in to comment.