Skip to content

Commit

Permalink
ESQL: Add tests for sort, where with unsupported type (#111737)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-spies authored Aug 9, 2024
1 parent 5a7a032 commit 843a6e4
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,26 @@ public void testUnsupportedAndMultiTypedFields() {
+ " [ip] in [test1, test2], [keyword] in [test3]",
error("from test* | rename multi_typed as x", analyzer)
);

assertEquals(
"1:19: Cannot use field [unsupported] with unsupported type [flattened]",
error("from test* | sort unsupported asc", analyzer)
);
assertEquals(
"1:19: Cannot use field [multi_typed] due to ambiguities being mapped as [2] incompatible types:"
+ " [ip] in [test1, test2], [keyword] in [test3]",
error("from test* | sort multi_typed desc", analyzer)
);

assertEquals(
"1:20: Cannot use field [unsupported] with unsupported type [flattened]",
error("from test* | where unsupported is null", analyzer)
);
assertEquals(
"1:20: Cannot use field [multi_typed] due to ambiguities being mapped as [2] incompatible types:"
+ " [ip] in [test1, test2], [keyword] in [test3]",
error("from test* | where multi_typed is not null", analyzer)
);
}

public void testRoundFunctionInvalidInputs() {
Expand Down

0 comments on commit 843a6e4

Please sign in to comment.