Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading