Ensure aliased GROUP BY fields are output correctly
This commit is contained in:
parent
b5b8f70330
commit
3c57496655
1 changed files with 4 additions and 1 deletions
|
@ -204,7 +204,10 @@ impl Iterator {
|
|||
if let Field::Alias(v, i) = field {
|
||||
match v {
|
||||
Value::Function(f) if f.is_aggregate() => {
|
||||
let x = vals.all().get(ctx, opt, txn, i).await?;
|
||||
let x = vals
|
||||
.all()
|
||||
.get(ctx, opt, txn, v.to_idiom().as_ref())
|
||||
.await?;
|
||||
let x = f.aggregate(x).compute(ctx, opt, txn, None).await?;
|
||||
obj.set(ctx, opt, txn, i, x).await?;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue