-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
A clear and concise description of what the bug is.
Cannot do count(Expr::Wildcard) aggregate with DataFrame API
To Reproduce
Steps to reproduce the behavior:
ctx.table("alltypes_plain")
.await?
.aggregate(vec![], vec![count(Expr::Wildcard)])?
.explain(false, false)?
.show()
.await?;Throws error:
Error: Internal("Wildcard expressions are not valid in a logical query plan")
Expected behavior
A clear and concise description of what you expected to happen.
Should be like when doing SQL:
ctx.sql("select count(*) from alltypes_plain")
.await?
.explain(false, false)?
.show()
.await?;Gives plan:
+---------------+---------------------------------------------------+
| plan_type | plan |
+---------------+---------------------------------------------------+
| logical_plan | Aggregate: groupBy=[[]], aggr=[[COUNT(UInt8(1))]] |
| | TableScan: alltypes_plain projection=[id] |
| physical_plan | ProjectionExec: expr=[7300 as COUNT(UInt8(1))] |
| | EmptyExec: produce_one_row=true |
| | |
+---------------+---------------------------------------------------+
Where count(*) has been transformed to count(1) essentially.
Additional context
Add any other context about the problem here.
Expansion substitute:
See SQL substitute function:
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working