diff --git a/core/src/main/java/org/opensearch/sql/ast/tree/Trendline.java b/core/src/main/java/org/opensearch/sql/ast/tree/Trendline.java index 3f9f9e2fbc..aa4fcc200d 100644 --- a/core/src/main/java/org/opensearch/sql/ast/tree/Trendline.java +++ b/core/src/main/java/org/opensearch/sql/ast/tree/Trendline.java @@ -66,7 +66,6 @@ public R accept(AbstractNodeVisitor nodeVisitor, C context) { } public enum TrendlineType { - SMA, - WMA + SMA } } diff --git a/docs/user/ppl/cmd/trendline.rst b/docs/user/ppl/cmd/trendline.rst index 4e528508f9..166a3c056f 100644 --- a/docs/user/ppl/cmd/trendline.rst +++ b/docs/user/ppl/cmd/trendline.rst @@ -19,9 +19,9 @@ Syntax * [+|-]: optional. The plus [+] stands for ascending order and NULL/MISSING first and a minus [-] stands for descending order and NULL/MISSING last. **Default:** ascending order and NULL/MISSING first. * sort-field: mandatory when sorting is used. The field used to sort. -* number-of-datapoints: mandatory. number of datapoints to calculate the moving average (must be greater than zero). -* field: mandatory. the name of the field the moving average should be calculated for. -* alias: optional. the name of the resulting column containing the moving average. +* number-of-datapoints: mandatory. The number of datapoints to calculate the moving average (must be greater than zero). +* field: mandatory. The name of the field the moving average should be calculated for. +* alias: optional. The name of the resulting column containing the moving average (defaults to the field name with "_trendline"). And the moment only the Simple Moving Average (SMA) type is supported.