mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
fixed issue with interplay between count(*) and _id column (#2250)
This commit is contained in:
parent
6bf693b98c
commit
f205459003
1 changed files with 7 additions and 1 deletions
|
|
@ -644,7 +644,13 @@ func tryToReplaceGroupByWithPQLAggregate(ctx context.Context, a *ExecutionPlanne
|
|||
}
|
||||
switch aggregable.AggExpression().Type().(type) {
|
||||
case *parser.DataTypeID, *parser.DataTypeString:
|
||||
return thisNode, true, nil
|
||||
// if it is any other column other than _id bail
|
||||
ref, ok := aggregable.AggExpression().(*qualifiedRefPlanExpression)
|
||||
if ok {
|
||||
if !strings.EqualFold(ref.columnName, "_id") {
|
||||
return thisNode, true, nil
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue