sunithabeeram commented on a change in pull request #3568: Add guava cache to
cache table schema in pinot broker
URL: https://github.com/apache/incubator-pinot/pull/3568#discussion_r255361065
##########
File path:
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
##########
@@ -332,6 +340,31 @@ private void validateRequest(BrokerRequest brokerRequest)
{
"Value for 'LIMIT' (" + limit + ") exceeds maximum allowed value
of " + _queryResponseLimit);
}
}
+
+ // Checks whether the query contains non-existent columns.
+ // Table name has already been verified before hitting this line.
+ if (requestParams.isValidateQuery()) {
+ String tableName = brokerRequest.getQuerySource().getTableName();
+ Schema schema = _tableSchemaCache.getIfTableSchemaPresent(tableName);
+ if (schema != null) {
+ RequestInfo requestInfo =
RequestUtils.preComputeRequestInfo(brokerRequest);
+ // gets all the columns from broker request
+ Set<String> columnsFromBrokerRequest = requestInfo.getAllColumns();
Review comment:
Consider adding getPhysicalColumns so the virtual column filtering can be
done internally.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]