Skip to content

Commit 7a08ab5

Browse files
Copilothotlong
andcommitted
Fix query-ast aggregation test by excluding '*' when aggregations are present
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 4f95e3d commit 7a08ab5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/core/src/query/query-ast.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ export class QueryASTBuilder {
6868

6969
if (query.fields && query.fields.length > 0) {
7070
fields.push(...query.fields.map(field => this.buildField(field)));
71-
} else {
71+
} else if (!query.aggregations || query.aggregations.length === 0) {
72+
// Only add '*' if there are no aggregations
7273
fields.push(this.buildField('*'));
7374
}
7475

0 commit comments

Comments
 (0)