Skip to content

Commit 3eee2cd

Browse files
committed
chore: remove deprecated warnings on pub(crate) and a few others
We should not be littering the logs with warnings until we have an immediate plan to remove the deprecated functions. `new_metadata` is not able to be replaced until an actual replacement with kernel is available. At that time we can mark this as deprecated Signed-off-by: R. Tyler Croy <rtyler@brokenco.de>
1 parent e9028cb commit 3eee2cd

3 files changed

Lines changed: 7 additions & 16 deletions

File tree

crates/core/src/kernel/arrow/extract.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ use std::sync::Arc;
55
use arrow_array::{Array, ListArray, MapArray, RecordBatch, StructArray};
66
use arrow_schema::{ArrowError, DataType};
77

8-
use crate::{DeltaResult, DeltaTableError};
9-
108
/// Trait to extract a column by name from a record batch or nested / complex array.
119
pub(crate) trait ProvidesColumnByName {
1210
fn column_by_name(&self, name: &str) -> Option<&Arc<dyn Array>>;
@@ -27,12 +25,16 @@ impl ProvidesColumnByName for StructArray {
2725
/// Extracts a column by name and casts it to the given type array type `T`.
2826
///
2927
/// Returns an error if the column does not exist or if the column is not of type `T`.
28+
///
29+
/// Note: this is currently only used in the datafusion build so disabled elsewhere
30+
#[cfg(feature = "datafusion")]
3031
pub(crate) fn extract_and_cast<'a, T: Array + 'static>(
3132
arr: &'a dyn ProvidesColumnByName,
3233
name: &'a str,
33-
) -> DeltaResult<&'a T> {
34-
extract_and_cast_opt::<T>(arr, name)
35-
.ok_or(DeltaTableError::Generic(format!("missing-column: {name}")))
34+
) -> crate::DeltaResult<&'a T> {
35+
extract_and_cast_opt::<T>(arr, name).ok_or(crate::DeltaTableError::Generic(format!(
36+
"missing-column: {name}"
37+
)))
3638
}
3739

3840
/// Extracts a column by name and casts it to the given type array type `T`.

crates/core/src/kernel/models/actions.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use crate::TableProperty;
1313
pub use delta_kernel::actions::{Metadata, Protocol};
1414

1515
/// Please don't use, this API will be leaving shortly!
16-
#[deprecated(since = "0.27.0", note = "stop-gap for adopting kernel actions")]
1716
pub fn new_metadata(
1817
schema: &StructType,
1918
partition_columns: impl IntoIterator<Item = impl ToString>,
@@ -38,7 +37,6 @@ pub fn new_metadata(
3837
/// This trait is a stop-gap to adopt the Metadata action from delta-kernel-rs
3938
/// while the update / mutation APIs are being implemented. It allows us to implement
4039
/// additional APIs on the Metadata action and hide specifics of how we do the updates.
41-
#[deprecated(since = "0.27.0", note = "stop-gap for adopting kernel actions")]
4240
pub trait MetadataExt {
4341
fn with_table_id(self, table_id: String) -> DeltaResult<Metadata>;
4442

@@ -160,7 +158,6 @@ pub fn contains_timestampntz<'a>(mut fields: impl Iterator<Item = &'a StructFiel
160158
///
161159
/// Allows us to extend the Protocol struct with additional methods
162160
/// to update the protocol actions.
163-
#[deprecated(since = "0.27.0", note = "stop-gap for adopting kernel actions")]
164161
pub(crate) trait ProtocolExt {
165162
fn reader_features_set(&self) -> Option<HashSet<ReaderFeature>>;
166163
fn writer_features_set(&self) -> Option<HashSet<WriterFeature>>;
@@ -236,10 +233,6 @@ impl ProtocolExt for Protocol {
236233
/// use it to proxy updates to the kernel protocol action.
237234
///
238235
// TODO: Remove once we can use kernel protocol update APIs.
239-
#[deprecated(
240-
since = "0.27.0",
241-
note = "Just an internal shim for adopting kernel actions"
242-
)]
243236
pub(crate) struct ProtocolInner {
244237
/// The minimum version of the Delta read protocol that a client must implement
245238
/// in order to correctly read this table

crates/core/src/kernel/snapshot/iterators.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,6 @@ impl LogicalFileView {
117117
///
118118
/// this tries to parse the file string and if that fails, it will return the string as is.
119119
// TODO assert consistent handling of the paths encoding when reading log data so this logic can be removed.
120-
#[deprecated(
121-
since = "0.27.1",
122-
note = "Will no longer be meaningful once we have full url support"
123-
)]
124120
pub(crate) fn object_store_path(&self) -> Path {
125121
let path = self.path();
126122
// Try to preserve percent encoding if possible

0 commit comments

Comments
 (0)