This is an automated email from the ASF dual-hosted git repository. jackie pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push: new 153aeacbd1 Add a test for CASE WHEN scalar function. (#11340) 153aeacbd1 is described below commit 153aeacbd12752d796f84f1a8719439dff370599 Author: Shen Yu <s...@startree.ai> AuthorDate: Mon Aug 14 07:11:24 2023 +0000 Add a test for CASE WHEN scalar function. (#11340) --- .../pinot/integration/tests/NullHandlingIntegrationTest.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/NullHandlingIntegrationTest.java b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/NullHandlingIntegrationTest.java index f2517cebc0..cb2163b632 100644 --- a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/NullHandlingIntegrationTest.java +++ b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/NullHandlingIntegrationTest.java @@ -338,4 +338,15 @@ public class NullHandlingIntegrationTest extends BaseClusterIntegrationTestSet { JsonNode rows = response.get("resultTable").get("rows"); assertEquals(rows.get(0).get(0).asText(), "null"); } + + @Test + public void testCaseWhenAllLiteral() + throws Exception { + String sqlQuery = + "SELECT CASE WHEN true THEN 1 WHEN NOT true THEN 0 ELSE NULL END FROM mytable OPTION(enableNullHandling=true)"; + + JsonNode response = postQuery(sqlQuery); + + assertEquals(response.get("resultTable").get("rows").get(0).get(0).asInt(), 1); + } } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org