Skip to content

Commit

Permalink
Minor add ticket references to deprecated code (#14174)
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb authored Jan 20, 2025
1 parent 0a85bb4 commit f667a01
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions datafusion/proto-common/src/from_proto/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ impl TryFrom<&protobuf::Field> for Field {
fn try_from(field: &protobuf::Field) -> Result<Self, Self::Error> {
let datatype = field.arrow_type.as_deref().required("arrow_type")?;
let field = if field.dict_id != 0 {
// https://github.com/apache/datafusion/issues/14173
#[allow(deprecated)]
Self::new_dict(
field.name.as_str(),
Expand Down Expand Up @@ -436,6 +437,7 @@ impl TryFrom<&protobuf::ScalarValue> for ScalarValue {
let id = dict_batch.id();

let fields_using_this_dictionary = {
// See https://github.com/apache/datafusion/issues/14173
#[allow(deprecated)]
schema.fields_with_dict_id(id)
};
Expand Down
1 change: 1 addition & 0 deletions datafusion/proto-common/src/to_proto/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ impl TryFrom<&Field> for protobuf::Field {
children: Vec::new(),
metadata: field.metadata().clone(),
#[allow(deprecated)]
// See https://github.com/apache/datafusion/issues/14173 to remove deprecated dict_id
dict_id: field.dict_id().unwrap_or(0),
dict_ordered: field.dict_is_ordered().unwrap_or(false),
})
Expand Down
2 changes: 1 addition & 1 deletion datafusion/proto/tests/cases/roundtrip_logical_plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1815,7 +1815,7 @@ fn round_trip_datatype() {
}
}

// TODO file a ticket about handling deprecated dict_id attributes
// See https://github.com/apache/datafusion/issues/14173 to remove deprecated dict_id
#[allow(deprecated)]
#[test]
fn roundtrip_dict_id() -> Result<()> {
Expand Down

0 comments on commit f667a01

Please sign in to comment.