Skip to content

Commit 852c400

Browse files
committed
fix
1 parent d3eddc9 commit 852c400

16 files changed

Lines changed: 57 additions & 181 deletions

File tree

kernel/src/actions/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1712,7 +1712,7 @@ mod tests {
17121712
fn test_commit_info_into_engine_data() {
17131713
let engine = ExprEngine::new();
17141714

1715-
let commit_info = CommitInfo::new(0, None, None);
1715+
let commit_info = CommitInfo::new(0, None, None, None);
17161716
let commit_info_txn_id = commit_info.txn_id.clone();
17171717

17181718
let engine_data = commit_info.into_engine_data(CommitInfo::to_schema().into(), &engine);

kernel/src/checkpoint/tests.rs

Lines changed: 7 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,7 @@ fn test_deleted_file_retention_timestamp() -> DeltaResult<()> {
6060
#[test]
6161
fn test_create_checkpoint_metadata_batch() -> DeltaResult<()> {
6262
let (store, _) = new_in_memory_store();
63-
let engine = DefaultEngine::new(
64-
store.clone(),
65-
Arc::new(TokioBackgroundExecutor::new()),
66-
None,
67-
);
63+
let engine = DefaultEngine::new(store.clone(), Arc::new(TokioBackgroundExecutor::new()));
6864

6965
// 1st commit (version 0) - metadata and protocol actions
7066
// Protocol action does not include the v2Checkpoint reader/writer feature.
@@ -120,11 +116,7 @@ fn test_create_last_checkpoint_data() -> DeltaResult<()> {
120116
let add_actions_counter = 75;
121117
let size_in_bytes: i64 = 1024 * 1024; // 1MB
122118
let (store, _) = new_in_memory_store();
123-
let engine = DefaultEngine::new(
124-
store.clone(),
125-
Arc::new(TokioBackgroundExecutor::new()),
126-
None,
127-
);
119+
let engine = DefaultEngine::new(store.clone(), Arc::new(TokioBackgroundExecutor::new()));
128120

129121
// Create last checkpoint metadata
130122
let last_checkpoint_batch = create_last_checkpoint_data(
@@ -285,11 +277,7 @@ fn read_last_checkpoint_file(store: &Arc<InMemory>) -> DeltaResult<Value> {
285277
#[test]
286278
fn test_v1_checkpoint_latest_version_by_default() -> DeltaResult<()> {
287279
let (store, _) = new_in_memory_store();
288-
let engine = DefaultEngine::new(
289-
store.clone(),
290-
Arc::new(TokioBackgroundExecutor::new()),
291-
None,
292-
);
280+
let engine = DefaultEngine::new(store.clone(), Arc::new(TokioBackgroundExecutor::new()));
293281

294282
// 1st commit: adds `fake_path_1`
295283
write_commit_to_store(&store, vec![create_add_action("fake_path_1")], 0)?;
@@ -359,11 +347,7 @@ fn test_v1_checkpoint_latest_version_by_default() -> DeltaResult<()> {
359347
#[test]
360348
fn test_v1_checkpoint_specific_version() -> DeltaResult<()> {
361349
let (store, _) = new_in_memory_store();
362-
let engine = DefaultEngine::new(
363-
store.clone(),
364-
Arc::new(TokioBackgroundExecutor::new()),
365-
None,
366-
);
350+
let engine = DefaultEngine::new(store.clone(), Arc::new(TokioBackgroundExecutor::new()));
367351

368352
// 1st commit (version 0) - metadata and protocol actions
369353
// Protocol action does not include the v2Checkpoint reader/writer feature.
@@ -425,11 +409,7 @@ fn test_v1_checkpoint_specific_version() -> DeltaResult<()> {
425409
#[test]
426410
fn test_finalize_errors_if_checkpoint_data_iterator_is_not_exhausted() -> DeltaResult<()> {
427411
let (store, _) = new_in_memory_store();
428-
let engine = DefaultEngine::new(
429-
store.clone(),
430-
Arc::new(TokioBackgroundExecutor::new()),
431-
None,
432-
);
412+
let engine = DefaultEngine::new(store.clone(), Arc::new(TokioBackgroundExecutor::new()));
433413

434414
// 1st commit (version 0) - metadata and protocol actions
435415
write_commit_to_store(
@@ -471,11 +451,7 @@ fn test_finalize_errors_if_checkpoint_data_iterator_is_not_exhausted() -> DeltaR
471451
#[test]
472452
fn test_v2_checkpoint_supported_table() -> DeltaResult<()> {
473453
let (store, _) = new_in_memory_store();
474-
let engine = DefaultEngine::new(
475-
store.clone(),
476-
Arc::new(TokioBackgroundExecutor::new()),
477-
None,
478-
);
454+
let engine = DefaultEngine::new(store.clone(), Arc::new(TokioBackgroundExecutor::new()));
479455

480456
// 1st commit: adds `fake_path_2` & removes `fake_path_1`
481457
write_commit_to_store(
@@ -547,11 +523,7 @@ fn test_v2_checkpoint_supported_table() -> DeltaResult<()> {
547523
#[test]
548524
fn test_no_checkpoint_staged_commits() -> DeltaResult<()> {
549525
let (store, _) = new_in_memory_store();
550-
let engine = DefaultEngine::new(
551-
store.clone(),
552-
Arc::new(TokioBackgroundExecutor::new()),
553-
None,
554-
);
526+
let engine = DefaultEngine::new(store.clone(), Arc::new(TokioBackgroundExecutor::new()));
555527

556528
// normal commit
557529
write_commit_to_store(

kernel/src/committer.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,7 @@ mod tests {
212212
async fn catalog_managed_tables_block_transactions() {
213213
let storage = Arc::new(InMemory::new());
214214
let table_root = Url::parse("memory:///").unwrap();
215-
let engine = DefaultEngine::new(
216-
storage.clone(),
217-
Arc::new(TokioBackgroundExecutor::new()),
218-
None,
219-
);
215+
let engine = DefaultEngine::new(storage.clone(), Arc::new(TokioBackgroundExecutor::new()));
220216

221217
let actions = [
222218
r#"{"commitInfo":{"timestamp":12345678900,"inCommitTimestamp":12345678900}}"#,

kernel/src/engine/default/filesystem.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ mod tests {
393393
store.put(&name, data.clone().into()).await.unwrap();
394394

395395
let table_root = Url::parse("memory:///").expect("valid url");
396-
let engine = DefaultEngine::new(store, Arc::new(TokioBackgroundExecutor::new()), None);
396+
let engine = DefaultEngine::new(store, Arc::new(TokioBackgroundExecutor::new()));
397397
let files: Vec<_> = engine
398398
.storage_handler()
399399
.list_from(&table_root.join("_delta_log").unwrap().join("0").unwrap())
@@ -423,7 +423,7 @@ mod tests {
423423

424424
let url = Url::from_directory_path(tmp.path()).unwrap();
425425
let store = Arc::new(LocalFileSystem::new());
426-
let engine = DefaultEngine::new(store, Arc::new(TokioBackgroundExecutor::new()), None);
426+
let engine = DefaultEngine::new(store, Arc::new(TokioBackgroundExecutor::new()));
427427
let files = engine
428428
.storage_handler()
429429
.list_from(&url.join("_delta_log").unwrap().join("0").unwrap())

kernel/src/kernel_predicates/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ fn test_eval_junction() {
387387
(&[], Some(true), Some(false)),
388388
(&[Some(true)], Some(true), Some(true)),
389389
(&[Some(false)], Some(false), Some(false)),
390-
(&[None], None),
390+
(&[None], None, None),
391391
(&[Some(true), Some(false)], Some(false), Some(true)),
392392
(&[Some(false), Some(true)], Some(false), Some(true)),
393393
(&[Some(true), None], None, Some(true)),

kernel/src/listed_log_files.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ mod list_log_files_with_log_tail_tests {
682682
];
683683

684684
let (storage, log_root) = create_storage(log_files);
685-
let result: Vec<_> = list_log_files(storage.as_ref(), &log_root, vec![], None)
685+
let result: Vec<_> = list_log_files(storage.as_ref(), &log_root, vec![], None, None)
686686
.unwrap()
687687
.try_collect()
688688
.unwrap();

kernel/src/log_compaction/tests.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,7 @@ fn test_no_compaction_staged_commits() {
237237

238238
// Set up in-memory store
239239
let store = Arc::new(InMemory::new());
240-
let engine = DefaultEngine::new(
241-
store.clone(),
242-
Arc::new(TokioBackgroundExecutor::new()),
243-
None,
244-
);
240+
let engine = DefaultEngine::new(store.clone(), Arc::new(TokioBackgroundExecutor::new()));
245241

246242
// Create basic commits with proper metadata and protocol
247243
use crate::actions::{Metadata, Protocol};

kernel/src/log_segment/tests.rs

Lines changed: 8 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -960,11 +960,7 @@ fn test_checkpoint_batch_with_no_sidecars_returns_none() -> DeltaResult<()> {
960960
#[test]
961961
fn test_checkpoint_batch_with_sidecars_returns_sidecar_batches() -> DeltaResult<()> {
962962
let (store, log_root) = new_in_memory_store();
963-
let engine = DefaultEngine::new(
964-
store.clone(),
965-
Arc::new(TokioBackgroundExecutor::new()),
966-
None,
967-
);
963+
let engine = DefaultEngine::new(store.clone(), Arc::new(TokioBackgroundExecutor::new()));
968964
let read_schema = get_all_actions_schema().project(&[ADD_NAME, REMOVE_NAME, SIDECAR_NAME])?;
969965

970966
add_sidecar_to_store(
@@ -1004,11 +1000,7 @@ fn test_checkpoint_batch_with_sidecars_returns_sidecar_batches() -> DeltaResult<
10041000
#[test]
10051001
fn test_checkpoint_batch_with_sidecar_files_that_do_not_exist() -> DeltaResult<()> {
10061002
let (store, log_root) = new_in_memory_store();
1007-
let engine = DefaultEngine::new(
1008-
store.clone(),
1009-
Arc::new(TokioBackgroundExecutor::new()),
1010-
None,
1011-
);
1003+
let engine = DefaultEngine::new(store.clone(), Arc::new(TokioBackgroundExecutor::new()));
10121004

10131005
let checkpoint_batch = sidecar_batch_with_given_paths(
10141006
vec!["sidecarfile1.parquet", "sidecarfile2.parquet"],
@@ -1035,11 +1027,7 @@ fn test_checkpoint_batch_with_sidecar_files_that_do_not_exist() -> DeltaResult<(
10351027
#[test]
10361028
fn test_reading_sidecar_files_with_predicate() -> DeltaResult<()> {
10371029
let (store, log_root) = new_in_memory_store();
1038-
let engine = DefaultEngine::new(
1039-
store.clone(),
1040-
Arc::new(TokioBackgroundExecutor::new()),
1041-
None,
1042-
);
1030+
let engine = DefaultEngine::new(store.clone(), Arc::new(TokioBackgroundExecutor::new()));
10431031
let read_schema = get_all_actions_schema().project(&[ADD_NAME, REMOVE_NAME, SIDECAR_NAME])?;
10441032

10451033
let checkpoint_batch =
@@ -1079,11 +1067,7 @@ fn test_reading_sidecar_files_with_predicate() -> DeltaResult<()> {
10791067
fn test_create_checkpoint_stream_returns_checkpoint_batches_as_is_if_schema_has_no_file_actions(
10801068
) -> DeltaResult<()> {
10811069
let (store, log_root) = new_in_memory_store();
1082-
let engine = DefaultEngine::new(
1083-
store.clone(),
1084-
Arc::new(TokioBackgroundExecutor::new()),
1085-
None,
1086-
);
1070+
let engine = DefaultEngine::new(store.clone(), Arc::new(TokioBackgroundExecutor::new()));
10871071
add_checkpoint_to_store(
10881072
&store,
10891073
// Create a checkpoint batch with sidecar actions to verify that the sidecar actions are not read.
@@ -1130,11 +1114,7 @@ fn test_create_checkpoint_stream_returns_checkpoint_batches_as_is_if_schema_has_
11301114
fn test_create_checkpoint_stream_returns_checkpoint_batches_if_checkpoint_is_multi_part(
11311115
) -> DeltaResult<()> {
11321116
let (store, log_root) = new_in_memory_store();
1133-
let engine = DefaultEngine::new(
1134-
store.clone(),
1135-
Arc::new(TokioBackgroundExecutor::new()),
1136-
None,
1137-
);
1117+
let engine = DefaultEngine::new(store.clone(), Arc::new(TokioBackgroundExecutor::new()));
11381118

11391119
// Multi-part checkpoints should never contain sidecar actions.
11401120
// This test intentionally includes batches with sidecar actions in multi-part checkpoints
@@ -1202,11 +1182,7 @@ fn test_create_checkpoint_stream_returns_checkpoint_batches_if_checkpoint_is_mul
12021182
fn test_create_checkpoint_stream_reads_parquet_checkpoint_batch_without_sidecars() -> DeltaResult<()>
12031183
{
12041184
let (store, log_root) = new_in_memory_store();
1205-
let engine = DefaultEngine::new(
1206-
store.clone(),
1207-
Arc::new(TokioBackgroundExecutor::new()),
1208-
None,
1209-
);
1185+
let engine = DefaultEngine::new(store.clone(), Arc::new(TokioBackgroundExecutor::new()));
12101186

12111187
add_checkpoint_to_store(
12121188
&store,
@@ -1249,11 +1225,7 @@ fn test_create_checkpoint_stream_reads_parquet_checkpoint_batch_without_sidecars
12491225
#[test]
12501226
fn test_create_checkpoint_stream_reads_json_checkpoint_batch_without_sidecars() -> DeltaResult<()> {
12511227
let (store, log_root) = new_in_memory_store();
1252-
let engine = DefaultEngine::new(
1253-
store.clone(),
1254-
Arc::new(TokioBackgroundExecutor::new()),
1255-
None,
1256-
);
1228+
let engine = DefaultEngine::new(store.clone(), Arc::new(TokioBackgroundExecutor::new()));
12571229

12581230
let filename = "00000000000000000010.checkpoint.80a083e8-7026-4e79-81be-64bd76c43a11.json";
12591231

@@ -1311,11 +1283,7 @@ fn test_create_checkpoint_stream_reads_json_checkpoint_batch_without_sidecars()
13111283
fn test_create_checkpoint_stream_reads_checkpoint_file_and_returns_sidecar_batches(
13121284
) -> DeltaResult<()> {
13131285
let (store, log_root) = new_in_memory_store();
1314-
let engine = DefaultEngine::new(
1315-
store.clone(),
1316-
Arc::new(TokioBackgroundExecutor::new()),
1317-
None,
1318-
);
1286+
let engine = DefaultEngine::new(store.clone(), Arc::new(TokioBackgroundExecutor::new()));
13191287

13201288
add_checkpoint_to_store(
13211289
&store,

kernel/src/path.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -958,11 +958,7 @@ mod tests {
958958
#[tokio::test]
959959
async fn test_read_in_commit_timestamp_success() {
960960
let store = Arc::new(InMemory::new());
961-
let engine = DefaultEngine::new(
962-
store.clone(),
963-
Arc::new(TokioBackgroundExecutor::new()),
964-
None,
965-
);
961+
let engine = DefaultEngine::new(store.clone(), Arc::new(TokioBackgroundExecutor::new()));
966962
let table_url = url::Url::parse("memory://test/").unwrap();
967963

968964
// Create a commit file with ICT using add_commit
@@ -991,11 +987,7 @@ mod tests {
991987
#[tokio::test]
992988
async fn test_read_in_commit_timestamp_missing_ict() {
993989
let store = Arc::new(InMemory::new());
994-
let engine = DefaultEngine::new(
995-
store.clone(),
996-
Arc::new(TokioBackgroundExecutor::new()),
997-
None,
998-
);
990+
let engine = DefaultEngine::new(store.clone(), Arc::new(TokioBackgroundExecutor::new()));
999991
let table_url = url::Url::parse("memory://test/").unwrap();
1000992

1001993
// Create a commit file without ICT

kernel/src/scan/data_skipping/tests.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -305,19 +305,19 @@ fn test_sql_where() {
305305

306306
let pred = &Pred::is_not_null(col.clone());
307307
do_test(ALL_NULL, pred, PRESENT, Some(false), Some(false));
308-
do_test(ALL_NULL, pred, MISSING, None);
308+
do_test(ALL_NULL, pred, MISSING, None, None);
309309

310310
// SQL WHERE allows a present-but-all-null column to be pruned, but not a missing column.
311311
let pred = &Pred::lt(col.clone(), VAL);
312312
do_test(NO_NULL, pred, PRESENT, Some(true), Some(true));
313313
do_test(SOME_NULL, pred, PRESENT, Some(true), Some(true));
314314
do_test(ALL_NULL, pred, PRESENT, None, Some(false));
315-
do_test(ALL_NULL, pred, MISSING, None);
315+
do_test(ALL_NULL, pred, MISSING, None, None);
316316

317317
// Comparison inside AND works
318318
let pred = &Pred::and(TRUE, Pred::lt(VAL, col.clone()));
319319
do_test(ALL_NULL, pred, PRESENT, None, Some(false));
320-
do_test(ALL_NULL, pred, MISSING, None);
320+
do_test(ALL_NULL, pred, MISSING, None, None);
321321

322322
// NULL inside AND allows static skipping under SQL semantics
323323
let pred = &Pred::and(NULL, Pred::lt(col.clone(), VAL));
@@ -327,17 +327,17 @@ fn test_sql_where() {
327327
// Comparison inside AND inside AND works
328328
let pred = &Pred::and(TRUE, Pred::and(TRUE, Pred::lt(col.clone(), VAL)));
329329
do_test(ALL_NULL, pred, PRESENT, None, Some(false));
330-
do_test(ALL_NULL, pred, MISSING, None);
330+
do_test(ALL_NULL, pred, MISSING, None, None);
331331

332332
// Comparison inside OR works
333333
let pred = &Pred::or(FALSE, Pred::lt(col.clone(), VAL));
334334
do_test(ALL_NULL, pred, PRESENT, None, Some(false));
335-
do_test(ALL_NULL, pred, MISSING, None);
335+
do_test(ALL_NULL, pred, MISSING, None, None);
336336

337337
// Comparison inside AND inside OR works
338338
let pred = &Pred::or(FALSE, Pred::and(TRUE, Pred::lt(col.clone(), VAL)));
339339
do_test(ALL_NULL, pred, PRESENT, None, Some(false));
340-
do_test(ALL_NULL, pred, MISSING, None);
340+
do_test(ALL_NULL, pred, MISSING, None, None);
341341
}
342342

343343
// TODO(#1002): we currently don't support file skipping on timestamp columns' max stat since they

0 commit comments

Comments
 (0)