Skip to content
Open
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
936f6f2
tracing changes
lorenarosati Jan 20, 2026
51c1b11
Merge branch 'main' into table-config-tracing
lorenarosati Jan 20, 2026
b311f15
added testing
lorenarosati Jan 20, 2026
8a6ca27
Merge branch 'table-config-tracing' of github.com:lorenarosati/delta-…
lorenarosati Jan 20, 2026
05cfdbe
changes
lorenarosati Jan 21, 2026
563130a
changed everything to delta serialization format
lorenarosati Jan 21, 2026
4842e50
Merge branch 'main' into table-config-tracing
lorenarosati Jan 21, 2026
143749c
formatting
lorenarosati Jan 21, 2026
244d62a
Merge branch 'table-config-tracing' of github.com:lorenarosati/delta-…
lorenarosati Jan 21, 2026
fd341be
use serial_test crate so traced tests dont run at same time as others
lorenarosati Jan 21, 2026
162e710
removed serial
lorenarosati Jan 21, 2026
30a7f84
replaced tracing-test crate with using tracing-subscriber with a test…
lorenarosati Jan 21, 2026
cc2446c
fixed custom writer
lorenarosati Jan 21, 2026
fcf241f
removed subscriber from wrong test
lorenarosati Jan 21, 2026
da7e2be
moved file writer
lorenarosati Jan 21, 2026
b29b946
fixing code cov
lorenarosati Jan 21, 2026
ba191f3
Merge branch 'main' into table-config-tracing
lorenarosati Jan 21, 2026
5b46ce5
fix
lorenarosati Jan 21, 2026
0193410
Merge branch 'table-config-tracing' of github.com:lorenarosati/delta-…
lorenarosati Jan 21, 2026
e28f03f
fix
lorenarosati Jan 21, 2026
afa0c2f
removed comment
lorenarosati Jan 21, 2026
87fae6a
Merge branch 'main' into table-config-tracing
lorenarosati Jan 21, 2026
5a7a8b3
Merge branch 'main' into table-config-tracing
lorenarosati Jan 21, 2026
a938d4d
moved logwriter to test-utils
lorenarosati Jan 21, 2026
bf5efe5
Merge branch 'main' into table-config-tracing
lorenarosati Jan 22, 2026
7323bf0
added tracing statemnets
lorenarosati Jan 22, 2026
c4867c2
Merge branch 'main' into cdf-tracing
lorenarosati Jan 23, 2026
3b07816
Merge branch 'main' into cdf-tracing
lorenarosati Jan 23, 2026
6251ec3
quick fix w timestamp variable
lorenarosati Jan 23, 2026
0b3a3d4
Merge branch 'cdf-tracing' of github.com:lorenarosati/delta-kernel-rs…
lorenarosati Jan 23, 2026
a0ecd22
added logging test set up
lorenarosati Jan 23, 2026
abd5371
added test for cdc action=true
lorenarosati Jan 23, 2026
4aa9449
added test for deletion vector
lorenarosati Jan 23, 2026
25d8f33
dv test
lorenarosati Jan 23, 2026
652f717
added id to trace
lorenarosati Jan 23, 2026
76536ad
Merge branch 'main' into cdf-tracing
lorenarosati Jan 23, 2026
b99c00d
Merge branch 'main' into cdf-tracing
lorenarosati Jan 23, 2026
80b924d
added default to pass test
lorenarosati Jan 23, 2026
e3f1c7e
quick fix
lorenarosati Jan 23, 2026
800365d
Merge branch 'main' into cdf-tracing
lorenarosati Jan 24, 2026
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
12 changes: 11 additions & 1 deletion kernel/src/table_changes/log_replay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::actions::{
};
use crate::engine_data::{GetData, TypedGetData};
use crate::expressions::{column_name, ColumnName};
use crate::path::ParsedLogPath;
use crate::path::{AsUrl, ParsedLogPath};
use crate::scan::data_skipping::DataSkippingFilter;
use crate::scan::state::DvInfo;
use crate::schema::{
Expand Down Expand Up @@ -253,6 +253,16 @@ impl LogReplayScanner {
// same as an `add` action.
remove_dvs.retain(|rm_path, _| add_paths.contains(rm_path));
}

info!(
remove_dvs_size = remove_dvs.len(),
has_cdc_action = has_cdc_action,
file_path = %commit_file.location.as_url(),
version = commit_file.version,
timestamp = commit_file.location.last_modified,
"Phase 1 of CDF query processing completed"
);

Ok(LogReplayScanner {
timestamp: commit_file.location.last_modified,
commit_file,
Expand Down
70 changes: 70 additions & 0 deletions kernel/src/table_changes/log_replay/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -992,3 +992,73 @@ async fn print_table_configuration() {
assert!(log_output.contains("\"delta.columnMapping.mode\": \"none\""));
assert!(log_output.contains("\"delta.enableDeletionVectors\": \"true\""));
}

#[tokio::test]
async fn print_table_info_post_phase1() {
let logs = Arc::new(Mutex::new(Vec::new()));
let logs_clone = logs.clone();

let subscriber = tracing_subscriber::registry().with(
tracing_subscriber::fmt::layer()
.with_writer(move || LogWriter(logs_clone.clone()))
.with_ansi(false),
);

let _guard = tracing::subscriber::set_default(subscriber);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm also noticing that we're duplicating this. Maybe make this a helper function for setting up a logging test?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just added!


let engine = Arc::new(SyncEngine::new());
let mut mock_table = LocalMockTable::new();
// This specific commit (with these actions) isn't necessary to test the tracing, we just need to have one commit with any actions
mock_table
.commit([
Action::Metadata(
Metadata::try_new(
None,
None,
get_schema(),
vec![],
0,
HashMap::from([
("delta.enableChangeDataFeed".to_string(), "true".to_string()),
(
"delta.enableDeletionVectors".to_string(),
"true".to_string(),
),
("delta.columnMapping.mode".to_string(), "none".to_string()),
]),
)
.unwrap(),
),
Action::Protocol(
Protocol::try_new(
3,
7,
Some([TableFeature::DeletionVectors]),
Some([TableFeature::DeletionVectors, TableFeature::ChangeDataFeed]),
)
.unwrap(),
),
])
.await;

let commits = get_segment(engine.as_ref(), mock_table.table_root(), 0, None)
.unwrap()
.into_iter();

let table_root_url = url::Url::from_directory_path(mock_table.table_root()).unwrap();
let table_config = get_default_table_config(&table_root_url);

let _scan_batches: DeltaResult<Vec<_>> =
table_changes_action_iter(engine, &table_config, commits, get_schema().into(), None)
.unwrap()
.try_collect();

let log_output = String::from_utf8(logs.lock().unwrap().clone()).unwrap();

assert!(log_output.contains("Phase 1 of CDF query processing completed"));
assert!(log_output.contains("remove_dvs_size=0"));
assert!(log_output.contains("has_cdc_action=false"));
assert!(log_output.contains("file_path="));
assert!(log_output.contains("version=0"));
assert!(log_output.contains("timestamp="));
}
Loading