Skip to content

Commit f6ac906

Browse files
luigidellaquilafzowl
authored andcommitted
SQL: add tests for 136854 (elastic#136935)
Follow-up to elastic#136854, just adding a test
1 parent 3ead838 commit f6ac906

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

x-pack/plugin/sql/src/test/java/org/elasticsearch/xpack/sql/optimizer/OptimizerRunTests.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,11 @@ public void testSimplifyComparisonArithmeticWithDateAndMultiplication() {
223223
);
224224
}
225225

226+
public void testIfNullPercentile() {
227+
LogicalPlan p = plan("SELECT NULLIF(PERCENTILE(0+int+int, 50), 0) from test");
228+
assertNotNull(p);
229+
}
230+
226231
private void doTestSimplifyComparisonArithmetics(String expression, String fieldName, String compSymbol, Object bound) {
227232
BinaryComparison bc = extractPlannedBinaryComparison(expression);
228233
assertEquals(compSymbol, bc.symbol());

0 commit comments

Comments
 (0)