Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 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
5b6090f
add ict support
lorenarosati Jan 23, 2026
9c2f440
Merge branch 'main' into add-ict-to-cdf
lorenarosati Jan 23, 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
22 changes: 20 additions & 2 deletions 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,8 +253,26 @@ impl LogReplayScanner {
// same as an `add` action.
remove_dvs.retain(|rm_path, _| add_paths.contains(rm_path));
}

// If ICT is enabled, then set the timestamp to be the ICT; otherwise, default to the last_modified timestamp value
let mut timestamp = commit_file.location.last_modified;
if table_configuration.is_feature_enabled(&TableFeature::InCommitTimestamp) {
if let Ok(in_commit_timestamp) = commit_file.read_in_commit_timestamp(engine) {
timestamp = in_commit_timestamp;
}
}

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 = timestamp,
"Phase 1 of CDF query processing completed"
);

Ok(LogReplayScanner {
timestamp: commit_file.location.last_modified,
timestamp,
commit_file,
has_cdc_action,
remove_dvs,
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);

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