Skip to content

Commit 01827ab

Browse files
CoollZzzrobertMileaNi
authored andcommitted
Add statistical type aggregate functions, including autocorrelation, skewness, and linear regression (apache#17292)
1 parent fb12bfa commit 01827ab

29 files changed

Lines changed: 4438 additions & 4 deletions

File tree

integration-test/src/main/java/org/apache/iotdb/itbase/constant/BuiltinAggregationFunctionEnum.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,14 @@ public enum BuiltinAggregationFunctionEnum {
4444
AVG("avg"),
4545
SUM("sum"),
4646
MAX_BY("max_by"),
47-
MIN_BY("min_by");
47+
MIN_BY("min_by"),
48+
CORR("corr"),
49+
COVAR_POP("covar_pop"),
50+
COVAR_SAMP("covar_samp"),
51+
REGR_SLOPE("regr_slope"),
52+
REGR_INTERCEPT("regr_intercept"),
53+
SKEWNESS("skewness"),
54+
KURTOSIS("kurtosis");
4855

4956
private final String functionName;
5057

integration-test/src/main/java/org/apache/iotdb/itbase/constant/TestConstant.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,34 @@ public static String varSamp(String path) {
145145
return String.format("var_samp(%s)", path);
146146
}
147147

148+
public static String corr(String path) {
149+
return String.format("corr(%s)", path);
150+
}
151+
152+
public static String covarPop(String path) {
153+
return String.format("covar_pop(%s)", path);
154+
}
155+
156+
public static String covarSamp(String path) {
157+
return String.format("covar_samp(%s)", path);
158+
}
159+
160+
public static String regrSlope(String path) {
161+
return String.format("regr_slope(%s)", path);
162+
}
163+
164+
public static String regrIntercept(String path) {
165+
return String.format("regr_intercept(%s)", path);
166+
}
167+
168+
public static String kurtosis(String path) {
169+
return String.format("kurtosis(%s)", path);
170+
}
171+
172+
public static String skewness(String path) {
173+
return String.format("skewness(%s)", path);
174+
}
175+
148176
public static String countUDAF(String path) {
149177
return String.format("count_udaf(%s)", path);
150178
}

0 commit comments

Comments
 (0)