amrishlal commented on a change in pull request #6651: URL: https://github.com/apache/incubator-pinot/pull/6651#discussion_r589768151
########## File path: pinot-core/src/test/java/org/apache/pinot/queries/JsonMatchPredicateTest.java ########## @@ -282,6 +282,36 @@ public void testJsonMatchArrayWithIndex() { Assert.assertEquals(iterator.next()[0], "goofy"); } + /** Evaluate json_extract_scalar over string column that does not contain valid json data. */ + @Test + public void testJsonExtractScalarAgainstInvalidJson() { + // json_extract_scalar throws exception since we are trying to parse a non-JSON string. + Operator operator1 = getOperatorForSqlQuery( + "select count(*) FROM testTable WHERE json_extract_scalar(stringColumn, '$.name.first', 'INT') = 0"); + try { + IntermediateResultsBlock block1 = (IntermediateResultsBlock) operator1.nextBlock(); + Assert.assertTrue(false); Review comment: Done ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org