richardstartin commented on a change in pull request #8264: URL: https://github.com/apache/pinot/pull/8264#discussion_r816236985
########## File path: pinot-common/src/main/java/org/apache/pinot/sql/parsers/CalciteSqlParser.java ########## @@ -613,6 +613,20 @@ private static Expression toExpression(SqlNode node) { return RequestUtils.getIdentifierExpression(node.toString()); case LITERAL: return RequestUtils.getLiteralExpression((SqlLiteral) node); + case IS_NULL: + SqlBasicCall isNullSQLNode = (SqlBasicCall) node; + List<SqlNode> isNullOperands = isNullSQLNode.getOperandList(); + Expression isNullLeftExpr = toExpression(isNullOperands.get(0)); + final Expression isNullExpr = RequestUtils.getFunctionExpression("IS_NULL"); + isNullExpr.getFunctionCall().addToOperands(isNullLeftExpr); + return isNullExpr; + case IS_NOT_NULL: + SqlBasicCall isNotNullSQLNode = (SqlBasicCall) node; + List<SqlNode> isNotNullOperands = isNotNullSQLNode.getOperandList(); + Expression isNotNullLeftExpr = toExpression(isNotNullOperands.get(0)); + final Expression isNotNullExpr = RequestUtils.getFunctionExpression("IS_NOT_NULL"); + isNotNullExpr.getFunctionCall().addToOperands(isNotNullLeftExpr); + return isNotNullExpr; Review comment: Can you extract out a method please? -- 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. To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org 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