From b3a3b7d770114f067006262ae0763da6429532ad Mon Sep 17 00:00:00 2001 From: Oussama Saoudi Date: Thu, 19 Sep 2024 13:45:22 -0700 Subject: [PATCH] Fix column name for protocol in P&M query (#343) This is a followup to [this PR](https://github.com/delta-incubator/delta-kernel-rs/pull/336) which patches a mistake in the filter. Protocol has a `protocol.minReaderVersion`, and no `protocol.min_reader_version` field. This PR also fixes an intermittent test failure caused by repeat initialization of tracing. This PR changes the `test_scan_data` test to instead use the test_log crate for initializing logs. --- kernel/src/scan/mod.rs | 6 +----- kernel/src/snapshot.rs | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/kernel/src/scan/mod.rs b/kernel/src/scan/mod.rs index 33ccaf4ac..b4d9c59c1 100644 --- a/kernel/src/scan/mod.rs +++ b/kernel/src/scan/mod.rs @@ -625,12 +625,8 @@ mod tests { ); } - #[test] + #[test_log::test] fn test_scan_data() { - use tracing_subscriber::EnvFilter; - tracing_subscriber::fmt() - .with_env_filter(EnvFilter::from_default_env()) - .init(); let path = std::fs::canonicalize(PathBuf::from("./tests/data/table-without-dv-small/")).unwrap(); let url = url::Url::from_directory_path(path).unwrap(); diff --git a/kernel/src/snapshot.rs b/kernel/src/snapshot.rs index 7fa55ce3f..5a02bcefb 100644 --- a/kernel/src/snapshot.rs +++ b/kernel/src/snapshot.rs @@ -76,7 +76,7 @@ impl LogSegment { use Expression as Expr; let filter = Some(Expr::or( Expr::not(Expr::is_null(Expr::column("metaData.id"))), - Expr::not(Expr::is_null(Expr::column("protocol.min_reader_version"))), + Expr::not(Expr::is_null(Expr::column("protocol.minReaderVersion"))), )); // read the same protocol and metadata schema for both commits and checkpoints let data_batches = self.replay(engine, schema.clone(), schema, filter)?;