Skip to content

Commit 3584f91

Browse files
feat: Add DISTINCT_ARRAY aggregation type (#110)
* feat: add distinct aggregation * add DISTINCT_ARRAY operator * update attribute service
1 parent 7b93309 commit 3584f91

File tree

6 files changed

+12
-4
lines changed

6 files changed

+12
-4
lines changed

hypertrace-core-graphql-attribute-store/src/main/java/org/hypertrace/core/graphql/attributes/AttributeModelMetricAggregationType.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ public enum AttributeModelMetricAggregationType {
88
MAX,
99
AVGRATE,
1010
PERCENTILE,
11-
DISTINCT_COUNT
11+
DISTINCT_COUNT,
12+
DISTINCT_ARRAY
1213
}

hypertrace-core-graphql-attribute-store/src/main/java/org/hypertrace/core/graphql/attributes/AttributeModelTranslator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ private AttributeModelMetricAggregationType convertMetricAggregationType(
6060
return AttributeModelMetricAggregationType.PERCENTILE;
6161
case DISTINCT_COUNT:
6262
return AttributeModelMetricAggregationType.DISTINCT_COUNT;
63+
case DISTINCT_ARRAY:
64+
return AttributeModelMetricAggregationType.DISTINCT_ARRAY;
6365
case AGG_UNDEFINED:
6466
case UNRECOGNIZED:
6567
default:

hypertrace-core-graphql-common-schema/src/main/java/org/hypertrace/core/graphql/common/schema/attributes/MetricAggregationType.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ public enum MetricAggregationType {
1111
MAX,
1212
AVGRATE,
1313
PERCENTILE,
14-
DISTINCTCOUNT;
14+
DISTINCTCOUNT,
15+
DISTINCT_ARRAY;
1516

1617
public static final String TYPE_NAME = "MetricAggregationType";
1718
}

hypertrace-core-graphql-common-schema/src/main/java/org/hypertrace/core/graphql/common/utils/attributes/AttributeModelMetricAggregationTypeConverter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ public Single<AttributeModelMetricAggregationType> convert(
2929
return Single.just(AttributeModelMetricAggregationType.PERCENTILE);
3030
case DISTINCTCOUNT:
3131
return Single.just(AttributeModelMetricAggregationType.DISTINCT_COUNT);
32+
case DISTINCT_ARRAY:
33+
return Single.just(AttributeModelMetricAggregationType.DISTINCT_ARRAY);
3234
default:
3335
return Single.error(
3436
new UnknownFormatConversionException(

hypertrace-core-graphql-common-schema/src/main/java/org/hypertrace/core/graphql/common/utils/attributes/MetricAggregationTypeConverter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ public Single<MetricAggregationType> convert(
2929
return Single.just(MetricAggregationType.PERCENTILE);
3030
case DISTINCT_COUNT:
3131
return Single.just(MetricAggregationType.DISTINCTCOUNT);
32+
case DISTINCT_ARRAY:
33+
return Single.just(MetricAggregationType.DISTINCT_ARRAY);
3234
default:
3335
return Single.error(
3436
new UnknownFormatConversionException(

hypertrace-core-graphql-platform/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ dependencies {
1414
api("org.hypertrace.core.grpcutils:grpc-client-utils:0.7.7")
1515
api("org.hypertrace.core.grpcutils:grpc-client-rx-utils:0.7.7")
1616
api("org.hypertrace.core.grpcutils:grpc-client-rx-utils:0.7.7")
17-
api("org.hypertrace.gateway.service:gateway-service-api:0.2.12")
18-
api("org.hypertrace.core.attribute.service:caching-attribute-service-client:0.13.6")
17+
api("org.hypertrace.gateway.service:gateway-service-api:0.2.13")
18+
api("org.hypertrace.core.attribute.service:caching-attribute-service-client:0.14.8")
1919

2020
api("com.google.inject:guice:5.1.0")
2121
api("com.graphql-java:graphql-java:15.0")

0 commit comments

Comments
 (0)