alamb commented on code in PR #8105:
URL: https://github.com/apache/arrow-datafusion/pull/8105#discussion_r1388014877
##########
datafusion/core/tests/dataframe/mod.rs:
##########
@@ -64,8 +63,8 @@ async fn test_count_wildcard_on_sort() -> Result<()> {
let df_results = ctx
.table("t1")
.await?
- .aggregate(vec![col("b")], vec![count(Wildcard)])?
- .sort(vec![count(Wildcard).sort(true, false)])?
+ .aggregate(vec![col("b")], vec![count(wildcard())])?
+ .sort(vec![count(wildcard()).sort(true, false)])?
Review Comment:
this shows the difference in API for users (calling `wildcard()`), which I
think is more consistent with other functions
##########
datafusion/expr/src/logical_plan/builder.rs:
##########
@@ -1287,11 +1287,16 @@ pub fn project(
for e in expr {
let e = e.into();
match e {
- Expr::Wildcard => {
+ Expr::Wildcard { qualifier: None } => {
projected_expr.extend(expand_wildcard(input_schema, &plan,
None)?)
}
- Expr::QualifiedWildcard { ref qualifier } => projected_expr
- .extend(expand_qualified_wildcard(qualifier, input_schema,
None)?),
+ Expr::Wildcard {
Review Comment:
here is the only place where Wildcard and QualifiedWildcard are treated
substantially differently
##########
datafusion/proto/src/logical_plan/to_proto.rs:
##########
@@ -1052,11 +1054,6 @@ impl TryFrom<&Expr> for protobuf::LogicalExprNode {
})),
}
}
-
Review Comment:
As a bonus, qualified wildcards can now be serialized to/from proto -- I
doubt this feature is widely used, but it is nice to avoid the rough edge I
think
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]