Skip to content

Commit 774fd50

Browse files
committed
remove import warnings
1 parent bd6260a commit 774fd50

File tree

2 files changed

+1
-43
lines changed

2 files changed

+1
-43
lines changed

kernel/src/table_changes/mod.rs

-41
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,16 @@
3131
//! let table_change_batches = table_changes_scan.execute(engine.clone())?;
3232
//! # Ok::<(), Error>(())
3333
//! ```
34-
use std::collections::HashSet;
3534
use std::sync::{Arc, LazyLock};
3635

3736
use scan::TableChangesScanBuilder;
3837
use url::Url;
3938

40-
use crate::actions::{ensure_supported_features, Protocol};
4139
use crate::log_segment::LogSegment;
4240
use crate::path::AsUrl;
4341
use crate::schema::{DataType, Schema, StructField, StructType};
4442
use crate::snapshot::Snapshot;
4543
use crate::table_configuration::TableConfiguration;
46-
use crate::table_features::{ColumnMappingMode, ReaderFeatures};
47-
use crate::table_properties::TableProperties;
48-
use crate::utils::require;
4944
use crate::{DeltaResult, Engine, Error, Version};
5045

5146
mod log_replay;
@@ -234,42 +229,6 @@ impl TableChanges {
234229
}
235230
}
236231

237-
/// Ensures that change data feed is enabled in `table_properties`. See the documentation
238-
/// of [`TableChanges`] for more details.
239-
fn check_cdf_table_properties(table_properties: &TableProperties) -> DeltaResult<()> {
240-
require!(
241-
table_properties.enable_change_data_feed.unwrap_or(false),
242-
Error::unsupported("Change data feed is not enabled")
243-
);
244-
require!(
245-
matches!(
246-
table_properties.column_mapping_mode,
247-
None | Some(ColumnMappingMode::None)
248-
),
249-
Error::unsupported("Change data feed not supported when column mapping is enabled")
250-
);
251-
Ok(())
252-
}
253-
254-
/// Ensures that Change Data Feed is supported for a table with this [`Protocol`] .
255-
/// See the documentation of [`TableChanges`] for more details.
256-
fn ensure_cdf_read_supported(protocol: &Protocol) -> DeltaResult<()> {
257-
static CDF_SUPPORTED_READER_FEATURES: LazyLock<HashSet<ReaderFeatures>> =
258-
LazyLock::new(|| HashSet::from([ReaderFeatures::DeletionVectors]));
259-
match &protocol.reader_features() {
260-
// if min_reader_version = 3 and all reader features are subset of supported => OK
261-
Some(reader_features) if protocol.min_reader_version() == 3 => {
262-
ensure_supported_features(reader_features, &CDF_SUPPORTED_READER_FEATURES)
263-
}
264-
// if min_reader_version = 1 and there are no reader features => OK
265-
None if protocol.min_reader_version() == 1 => Ok(()),
266-
// any other protocol is not supported
267-
_ => Err(Error::unsupported(
268-
"Change data feed not supported on this protocol",
269-
)),
270-
}
271-
}
272-
273232
#[cfg(test)]
274233
mod tests {
275234
use crate::engine::sync::SyncEngine;

kernel/src/table_changes/scan.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ use crate::actions::deletion_vector::split_vector;
1010
use crate::scan::state::GlobalScanState;
1111
use crate::scan::{ColumnType, PhysicalPredicate, ScanResult};
1212
use crate::schema::{SchemaRef, StructType};
13-
use crate::table_configuration::TableConfiguration;
14-
use crate::{table_configuration, DeltaResult, Engine, ExpressionRef, FileMeta};
13+
use crate::{DeltaResult, Engine, ExpressionRef, FileMeta};
1514

1615
use super::log_replay::{table_changes_action_iter, TableChangesScanData};
1716
use super::physical_to_logical::{physical_to_logical_expr, scan_file_physical_schema};

0 commit comments

Comments
 (0)