Skip to content

Commit

Permalink
Fix regression in regenerating protobuf source (#8603)
Browse files Browse the repository at this point in the history
* Fix regression in regenerating protobuf source

* update serde code
  • Loading branch information
andygrove authored Dec 20, 2023
1 parent 98a5a4e commit bc013fc
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion datafusion/proto/proto/datafusion.proto
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ message LogicalExprNode {
}

message Wildcard {
optional string qualifier = 1;
string qualifier = 1;
}

message PlaceholderNode {
Expand Down
10 changes: 5 additions & 5 deletions datafusion/proto/src/generated/pbjson.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions datafusion/proto/src/generated/prost.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion datafusion/proto/src/logical_plan/from_proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1338,7 +1338,11 @@ pub fn parse_expr(
in_list.negated,
))),
ExprType::Wildcard(protobuf::Wildcard { qualifier }) => Ok(Expr::Wildcard {
qualifier: qualifier.clone(),
qualifier: if qualifier.is_empty() {
None
} else {
Some(qualifier.clone())
},
}),
ExprType::ScalarFunction(expr) => {
let scalar_function = protobuf::ScalarFunction::try_from(expr.fun)
Expand Down
2 changes: 1 addition & 1 deletion datafusion/proto/src/logical_plan/to_proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ impl TryFrom<&Expr> for protobuf::LogicalExprNode {
}
Expr::Wildcard { qualifier } => Self {
expr_type: Some(ExprType::Wildcard(protobuf::Wildcard {
qualifier: qualifier.clone(),
qualifier: qualifier.clone().unwrap_or("".to_string()),
})),
},
Expr::ScalarSubquery(_)
Expand Down

0 comments on commit bc013fc

Please sign in to comment.