Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/core/common/src/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ pub mod errors;
pub mod logical;
pub mod physical;
pub mod reader;
pub mod resolve;
pub mod sql;
2 changes: 1 addition & 1 deletion crates/core/common/src/catalog/dataset_access.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::{BoxError, Dataset};
///
/// This trait provides the minimal interface required for SQL catalog building,
/// abstracting over the dataset store implementation.
pub trait DatasetAccess {
pub trait DatasetAccess: Send + Sync + 'static {
Copy link
Contributor

@LNSD LNSD Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these necessary? Can't we just require them in the where clause, or let the compiler infer them?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can put them in the where clause, but I have the habit of doing this for syntactical convenience. It's an internal trait so we can change whenever.

/// Resolve a dataset reference to a hash reference.
///
/// This method resolves a dataset reference (which may contain a version, "latest", etc.)
Expand Down
16 changes: 14 additions & 2 deletions crates/core/common/src/catalog/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ pub enum CatalogForSqlError {
/// exists in the dataset definition but has no physical parquet files.
#[error("Table '{table}' has not been synced")]
TableNotSynced { table: String },

/// Failed during catalog resolution.
///
/// This wraps errors from the core resolution logic.
#[error("Catalog resolution failed")]
Resolution(#[source] BoxError),
}

impl CatalogForSqlError {
Expand Down Expand Up @@ -174,11 +180,17 @@ pub enum PlanningCtxForSqlError {
/// dataset does not support eth_call (not an EVM RPC dataset or no provider configured).
#[error("Function 'eth_call' not available for dataset '{reference}'")]
EthCallNotAvailable { reference: HashReference },

/// Failed during catalog resolution.
///
/// This wraps errors from the core resolution logic.
#[error("Catalog resolution failed")]
Resolution(#[source] BoxError),
}

/// Errors specific to catalog_for_sql_with_deps operations
/// Errors specific to catalog_for_derived_table operations
///
/// This error type is used exclusively by `catalog_for_sql_with_deps()` to create
/// This error type is used exclusively by `catalog_for_derived_table()` to create
/// a physical catalog for SQL query execution with pre-resolved dependencies.
#[derive(Debug, thiserror::Error)]
#[allow(clippy::large_enum_variant)]
Expand Down
Loading