Skip to content

Commit

Permalink
Fix column name for protocol in P&M query (#343)
Browse files Browse the repository at this point in the history
This is a followup to [this
PR](#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.
  • Loading branch information
OussamaSaoudi-db authored Sep 19, 2024
1 parent 1a66fb9 commit b3a3b7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions kernel/src/scan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion kernel/src/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;
Expand Down

0 comments on commit b3a3b7d

Please sign in to comment.