Skip to content

Commit 50162fa

Browse files
committed
Adding ast aggregation operator
1 parent 1af3457 commit 50162fa

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

document-store/src/main/java/org/hypertrace/core/documentstore/expression/operators/AggregationOperator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ public enum AggregationOperator {
1111
SUM,
1212
MIN,
1313
MAX,
14+
LAST,
1415
}

document-store/src/main/java/org/hypertrace/core/documentstore/mongo/query/parser/MongoAggregateExpressionParser.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import static org.hypertrace.core.documentstore.expression.operators.AggregationOperator.COUNT;
66
import static org.hypertrace.core.documentstore.expression.operators.AggregationOperator.DISTINCT;
77
import static org.hypertrace.core.documentstore.expression.operators.AggregationOperator.DISTINCT_ARRAY;
8+
import static org.hypertrace.core.documentstore.expression.operators.AggregationOperator.LAST;
89
import static org.hypertrace.core.documentstore.expression.operators.AggregationOperator.MAX;
910
import static org.hypertrace.core.documentstore.expression.operators.AggregationOperator.MIN;
1011
import static org.hypertrace.core.documentstore.expression.operators.AggregationOperator.SUM;
@@ -30,6 +31,7 @@ final class MongoAggregateExpressionParser extends MongoSelectTypeExpressionPars
3031
put(MIN, "$min");
3132
put(MAX, "$max");
3233
put(COUNT, "$push");
34+
put(LAST, "$last");
3335
}
3436
});
3537

0 commit comments

Comments
 (0)