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: 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() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine -- I don't think an empty string "" is a valid qualifier anyways so not being able to distinguish between "" and None is not important

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