Jackie-Jiang commented on code in PR #13673: URL: https://github.com/apache/pinot/pull/13673#discussion_r1735050689
########## pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseSingleStageBrokerRequestHandler.java: ########## @@ -1510,87 +1511,30 @@ private BrokerResponseNative processLiteralOnlyQuery(long requestId, PinotQuery } // TODO(xiangfu): Move Literal function computation here from Calcite Parser. - private void computeResultsForExpression(Expression e, List<String> columnNames, - List<DataSchema.ColumnDataType> columnTypes, List<Object> row) { - if (e.getType() == ExpressionType.LITERAL) { - computeResultsForLiteral(e.getLiteral(), columnNames, columnTypes, row); - } - if (e.getType() == ExpressionType.FUNCTION) { - if (e.getFunctionCall().getOperator().equals("as")) { - String columnName = e.getFunctionCall().getOperands().get(1).getIdentifier().getName(); - computeResultsForExpression(e.getFunctionCall().getOperands().get(0), columnNames, columnTypes, row); - columnNames.set(columnNames.size() - 1, columnName); + private void computeResultsForExpression(Expression expression, String[] columnNames, ColumnDataType[] columnTypes, + Object[] values, int index) { + if (expression.getType() == ExpressionType.LITERAL) { + computeResultsForLiteral(expression.getLiteral(), columnNames, columnTypes, values, index); + } + if (expression.getType() == ExpressionType.FUNCTION) { Review Comment: Good point. -- 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