Skip to content

Commit

Permalink
fix: restore unused code, mark with expect(dead_code)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Lamb <[email protected]>
  • Loading branch information
alamb committed Feb 25, 2025
1 parent f7a6d69 commit 2dc030f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
13 changes: 13 additions & 0 deletions crates/core/src/kernel/models/fields.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,19 @@ static REMOVE_FIELD: LazyLock<StructField> = LazyLock::new(|| {
true,
)
});
// TODO implement support for this checkpoint
#[expect(dead_code)]
static REMOVE_FIELD_CHECKPOINT: LazyLock<StructField> = LazyLock::new(|| {
StructField::new(
"remove",
StructType::new(vec![
StructField::new("path", DataType::STRING, false),
StructField::new("deletionTimestamp", DataType::LONG, true),
StructField::new("dataChange", DataType::BOOLEAN, false),
]),
true,
)
});
// https://github.com/delta-io/delta/blob/master/PROTOCOL.md#add-cdc-file
static CDC_FIELD: LazyLock<StructField> = LazyLock::new(|| {
StructField::new(
Expand Down
12 changes: 11 additions & 1 deletion crates/core/src/operations/filesystem_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use futures::future::BoxFuture;
use futures::StreamExt;
pub use object_store::path::Path;
use object_store::ObjectStore;
use serde::{Serialize, Serializer};
use serde::{de::Error as DeError, Deserialize, Deserializer, Serialize, Serializer};
use url::{ParseError, Url};
use uuid::Uuid;

Expand Down Expand Up @@ -79,6 +79,16 @@ where
serializer.serialize_str(&json_string)
}

// Custom deserialization that parses a JSON string into MetricDetails
#[expect(dead_code)]
fn deserialize_vec_string<'de, D>(deserializer: D) -> Result<Vec<String>, D::Error>
where
D: Deserializer<'de>,
{
let s: String = Deserialize::deserialize(deserializer)?;
serde_json::from_str(&s).map_err(DeError::custom)
}

fn is_absolute_path(path: &str) -> DeltaResult<bool> {
match Url::parse(path) {
Ok(_) => Ok(true),
Expand Down

0 comments on commit 2dc030f

Please sign in to comment.