Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESQL: Skip LOOKUP/INLINESTATS cases unless on snapshot #111755

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,6 @@ tests:
- class: org.elasticsearch.tdigest.ComparisonTests
method: testSparseGaussianDistribution
issue: https://github.com/elastic/elasticsearch/issues/111721
- class: org.elasticsearch.xpack.esql.analysis.VerifierTests
method: testUnsupportedAndMultiTypedFields
issue: https://github.com/elastic/elasticsearch/issues/111753

# Examples:
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,17 @@ public void testUnsupportedAndMultiTypedFields() {
+ " [ip] in [test1, test2], [keyword] in [test3]",
error("from test* | stats count(1) by multi_typed", analyzer)
);
assertEquals(
"1:38: Cannot use field [unsupported] with unsupported type [flattened]",
error("from test* | inlinestats count(1) by unsupported", analyzer)
);
assertEquals(
"1:38: Cannot use field [multi_typed] due to ambiguities being mapped as [2] incompatible types:"
+ " [ip] in [test1, test2], [keyword] in [test3]",
error("from test* | inlinestats count(1) by multi_typed", analyzer)
);
if (EsqlCapabilities.Cap.INLINESTATS.isEnabled()) {
assertEquals(
"1:38: Cannot use field [unsupported] with unsupported type [flattened]",
error("from test* | inlinestats count(1) by unsupported", analyzer)
);
assertEquals(
"1:38: Cannot use field [multi_typed] due to ambiguities being mapped as [2] incompatible types:"
+ " [ip] in [test1, test2], [keyword] in [test3]",
error("from test* | inlinestats count(1) by multi_typed", analyzer)
);
}

assertEquals(
"1:27: Cannot use field [unsupported] with unsupported type [flattened]",
Expand All @@ -157,15 +159,17 @@ public void testUnsupportedAndMultiTypedFields() {
+ " [ip] in [test1, test2], [keyword] in [test3]",
error("from test* | stats values(multi_typed)", analyzer)
);
assertEquals(
"1:33: Cannot use field [unsupported] with unsupported type [flattened]",
error("from test* | inlinestats values(unsupported)", analyzer)
);
assertEquals(
"1:33: Cannot use field [multi_typed] due to ambiguities being mapped as [2] incompatible types:"
+ " [ip] in [test1, test2], [keyword] in [test3]",
error("from test* | inlinestats values(multi_typed)", analyzer)
);
if (EsqlCapabilities.Cap.INLINESTATS.isEnabled()) {
assertEquals(
"1:33: Cannot use field [unsupported] with unsupported type [flattened]",
error("from test* | inlinestats values(unsupported)", analyzer)
);
assertEquals(
"1:33: Cannot use field [multi_typed] due to ambiguities being mapped as [2] incompatible types:"
+ " [ip] in [test1, test2], [keyword] in [test3]",
error("from test* | inlinestats values(multi_typed)", analyzer)
);
}

assertEquals(
"1:27: Cannot use field [unsupported] with unsupported type [flattened]",
Expand All @@ -177,16 +181,18 @@ public void testUnsupportedAndMultiTypedFields() {
error("from test* | stats values(multi_typed)", analyzer)
);

// LOOKUP with unsupported type
assertEquals(
"1:41: column type mismatch, table column was [integer] and original column was [unsupported]",
error("from test* | lookup int_number_names on int", analyzer)
);
// LOOKUP with multi-typed field
assertEquals(
"1:44: column type mismatch, table column was [double] and original column was [unsupported]",
error("from test* | lookup double_number_names on double", analyzer)
);
if (EsqlCapabilities.Cap.LOOKUP_V4.isEnabled()) {
// LOOKUP with unsupported type
assertEquals(
"1:41: column type mismatch, table column was [integer] and original column was [unsupported]",
error("from test* | lookup int_number_names on int", analyzer)
);
// LOOKUP with multi-typed field
assertEquals(
"1:44: column type mismatch, table column was [double] and original column was [unsupported]",
error("from test* | lookup double_number_names on double", analyzer)
);
}

assertEquals(
"1:24: Cannot use field [unsupported] with unsupported type [flattened]",
Expand Down