Skip to content

Commit ac48a09

Browse files
committed
add comments/todos
1 parent 7d30d44 commit ac48a09

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/operator/ChangePointOperator.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@
2222
import java.util.Deque;
2323
import java.util.LinkedList;
2424

25+
/**
26+
* Find spikes, dips and change point in a list of values.
27+
* <p>
28+
* Warning: this operator cannot handle large amounts of data! It buffers all
29+
* data that is passed to it, runs the change point detector on the data (which
30+
* is a compute-heavy process), and then outputs all data with the change points.
31+
*/
2532
public class ChangePointOperator implements Operator {
2633

2734
public static final int INPUT_VALUE_COUNT_LIMIT = 1000;
@@ -49,6 +56,8 @@ public String describe() {
4956
private boolean finished;
5057
private Warnings warnings;
5158

59+
// TODO: make org.elasticsearch.xpack.esql.core.tree.Source available here
60+
// (by modularizing esql-core) and use that instead of the individual fields.
5261
public ChangePointOperator(DriverContext driverContext, int channel, String sourceText, int sourceLine, int sourceColumn) {
5362
this.driverContext = driverContext;
5463
this.channel = channel;

x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/operator/Warnings.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public void registerException(Exception exception) {
3131
* @param sourceText The source text that caused the warning. Same as `source.text()`
3232
* @return A warnings collector object
3333
*/
34+
// TODO: rename to createWarningsTreatedAsNull
3435
public static Warnings createWarnings(DriverContext.WarningsMode warningsMode, int lineNumber, int columnNumber, String sourceText) {
3536
return createWarnings(warningsMode, lineNumber, columnNumber, sourceText, "evaluation of [{}] failed, treating result as null");
3637
}
@@ -62,6 +63,7 @@ public static Warnings createWarningsTreatedAsFalse(
6263
* @param sourceText The source text that caused the warning. Same as `source.text()`
6364
* @return A warnings collector object
6465
*/
66+
// TODO: rename to createWarnings
6567
public static Warnings createOnlyWarnings(
6668
DriverContext.WarningsMode warningsMode,
6769
int lineNumber,

0 commit comments

Comments
 (0)