shounakmk219 commented on code in PR #12417: URL: https://github.com/apache/pinot/pull/12417#discussion_r1514093985
########## pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java: ########## @@ -320,6 +321,11 @@ protected BrokerResponse handleRequest(long requestId, String query, @Nullable S // Compile the request into PinotQuery compilationStartTimeNs = System.nanoTime(); pinotQuery = CalciteSqlParser.compileToPinotQuery(sqlNodeAndOptions); + if (pinotQuery.getDataSource() != null && pinotQuery.getDataSource().getTableName() != null) { + String tableName = getActualTableName(DatabaseUtils.translateTableName( + pinotQuery.getDataSource().getTableName(), httpHeaders), _tableCache); + pinotQuery.getDataSource().setTableName(tableName); + } Review Comment: Yes, earlier I was not sure how the `GapfillUtils.stripGapfill(pinotQuery)` worked but as it was reassigning the PinotQuery and original PinotQuery was also being used later in the method by `getEmptyBrokerOnlyResponse`. I played safe and added translation for both of them. Now that you pointed it out, it seems that translation on just the reassigned PinotQuery should be sufficient. Will revert the first translation. Thanks for catching it! -- 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