Skip to content

Minor add ticket references to deprecated code #14174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 20, 2025
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