Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
7a872cf
Remove unused empty constructor
ivancea Aug 5, 2024
87db6ac
Added fallible single states
ivancea Aug 5, 2024
17e9ea2
Added fallible array state
ivancea Aug 5, 2024
318d5cd
Added custom warning object to aggregator function
ivancea Aug 6, 2024
4937082
Completed single aggregator implementation
ivancea Aug 6, 2024
7935330
Updated SumTests and format
ivancea Aug 6, 2024
35f7002
Update docs/changelog/111639.yaml
ivancea Aug 6, 2024
0fb3040
Fix tests compilation
ivancea Aug 6, 2024
0d33140
Add warn exceptions in grouping aggregator
ivancea Aug 7, 2024
523a583
Update docs/changelog/111639.yaml
ivancea Aug 7, 2024
1b09dd3
Early returns on non-grouping, and todos for missing catch
ivancea Aug 7, 2024
b1fdc25
Add try-catch in intermediate state
ivancea Aug 7, 2024
16b1cf8
Release failed array, and fixed warnings on grouping tests
ivancea Aug 7, 2024
d6d44c7
Fixed benchmark compilation
ivancea Aug 7, 2024
31cb9d1
Merge branch 'main' into sum-warns
ivancea Aug 12, 2024
10ae7b2
Extend from AbstractArrayState, and extract annotations method
ivancea Aug 12, 2024
e95cc8d
Removed obsolete test
ivancea Aug 12, 2024
55ac3b8
Merge branch 'main' into sum-warns
ivancea Aug 13, 2024
5530b3a
Merge branch 'main' into sum-warns
ivancea Aug 21, 2024
c76bb62
Merge branch 'main' into sum-warns
ivancea Sep 3, 2024
753af10
Test warnings for long overflow
ivancea Sep 3, 2024
7b2e1c7
Merge branch 'main' into sum-warns
ivancea Sep 5, 2024
678d183
Merge branch 'main' into sum-warns
ivancea Sep 9, 2024
ce4a448
Merge branch 'main' into sum-warns
ivancea Oct 1, 2024
086ee5a
Merge branch 'main' into sum-warns
ivancea Oct 14, 2024
d71eea2
Added CSV test failing in mixed cluster
ivancea Oct 14, 2024
5dd8762
Merge branch 'main' into sum-warns
ivancea Oct 14, 2024
c4a0aef
Merge branch 'main' into sum-warns
ivancea Oct 16, 2024
ce9d7c3
Merge branch 'main' into sum-warns
ivancea Oct 21, 2024
66ab25f
Merge branch 'main' into sum-warns-cluster-feature
ivancea Oct 31, 2024
919403c
Added features to Configuration, and use it in aggregate functions
ivancea Oct 31, 2024
5d026c2
Updated tests with config, and fixed serialization and AggregateMappe…
ivancea Oct 31, 2024
d207d68
Added old aggregator, AggregatorMapper change remaining
ivancea Oct 31, 2024
fd69d05
Added aggregator extra tests, and AggregateMapper updates to allow fo…
ivancea Oct 31, 2024
5b525f4
Format
ivancea Oct 31, 2024
fa3d7a4
Merge branch 'main' into sum-warns
ivancea Nov 4, 2024
0a1e99f
Merge branch 'sum-warns' into sum-warns-cluster-feature
ivancea Nov 4, 2024
bde36dd
Added required capability to CSV test on overflows
ivancea Nov 4, 2024
0978eeb
Update docs/changelog/116170.yaml
ivancea Nov 4, 2024
423549d
Remove old branch changelog entry
ivancea Nov 4, 2024
fb98bec
Add "final" again to AggregateFunction#writeTo
ivancea Nov 4, 2024
abcd246
Fixed serialization of functions with configuration
ivancea Nov 4, 2024
b9d66b4
Format
ivancea Nov 4, 2024
134a0d4
Fixed PhysicalOptimizerTests not using same config for everything
ivancea Nov 4, 2024
20d9adf
Format
ivancea Nov 4, 2024
cde0ed7
Merge branch 'main' into sum-warns-cluster-feature
ivancea Nov 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ private static AggregatorFunctionSupplier supplier(String op, String dataType, S
default -> throw new IllegalArgumentException("unsupported data type [" + dataType + "]");
};
case SUM -> switch (dataType) {
case LONGS -> new SumLongAggregatorFunctionSupplier(List.of(dataChannel));
case LONGS -> new SumLongAggregatorFunctionSupplier(-1, -2, "", List.of(dataChannel));
case DOUBLES -> new SumDoubleAggregatorFunctionSupplier(List.of(dataChannel));
default -> throw new IllegalArgumentException("unsupported data type [" + dataType + "]");
};
Expand Down
6 changes: 6 additions & 0 deletions docs/changelog/116170.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 116170
summary: "ESQL: Prevent overflow on SUM using multiple aggregators"
area: ES|QL
type: bug
issues:
- 110443
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ static TransportVersion def(int id) {
public static final TransportVersion QUERY_RULES_RETRIEVER = def(8_782_00_0);
public static final TransportVersion ESQL_CCS_EXEC_INFO_WITH_FAILURES = def(8_783_00_0);
public static final TransportVersion LOGSDB_TELEMETRY = def(8_784_00_0);
public static final TransportVersion ESQL_CONFIGURATION_WITH_FEATURES = def(8_785_00_0);

/*
* STOP! READ THIS FIRST! No, really,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ private static void setTestSysProps(Random random) {
}

protected final Logger logger = LogManager.getLogger(getClass());
private ThreadContext threadContext;
protected ThreadContext threadContext;

// -----------------------------------------------------------------
// Suite and test case setup/cleanup.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import static org.elasticsearch.compute.gen.Types.DRIVER_CONTEXT;
import static org.elasticsearch.compute.gen.Types.LIST_INTEGER;
import static org.elasticsearch.compute.gen.Types.STRING;
import static org.elasticsearch.compute.gen.Types.WARNINGS;

/**
* Implements "AggregationFunctionSupplier" from a class annotated with both
Expand Down Expand Up @@ -139,8 +140,9 @@ private MethodSpec aggregator() {

if (hasWarnings) {
builder.addStatement(
"var warnings = Warnings.createWarnings(driverContext.warningsMode(), "
+ "warningsLineNumber, warningsColumnNumber, warningsSourceText)"
"var warnings = $T.createWarnings(driverContext.warningsMode(), "
+ "warningsLineNumber, warningsColumnNumber, warningsSourceText)",
WARNINGS
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a bug in the PR implementing warnExceptions on aggs, which wasn't being used anywhere yet

);
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading