Jackie-Jiang commented on code in PR #13977: URL: https://github.com/apache/pinot/pull/13977#discussion_r1755491769
########## pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseSingleStageBrokerRequestHandler.java: ########## @@ -298,6 +298,15 @@ protected BrokerResponse handleRequest(long requestId, String query, @Nullable S } } + Map<String, String> queryOptions = sqlNodeAndOptions.getOptions(); + + // Add null handling option from broker config only if there is no override in the query + if (!queryOptions.containsKey(QueryOptionKey.ENABLE_NULL_HANDLING) Review Comment: We can use `putIfAbsent()` to reduce map access ########## pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseSingleStageBrokerRequestHandler.java: ########## @@ -298,6 +298,15 @@ protected BrokerResponse handleRequest(long requestId, String query, @Nullable S } } + Map<String, String> queryOptions = sqlNodeAndOptions.getOptions(); + + // Add null handling option from broker config only if there is no override in the query + if (!queryOptions.containsKey(QueryOptionKey.ENABLE_NULL_HANDLING) + && _config.containsKey(Broker.CONFIG_OF_BROKER_QUERY_ENABLE_NULL_HANDLING)) { + queryOptions.put(QueryOptionKey.ENABLE_NULL_HANDLING, + _config.getProperty(Broker.CONFIG_OF_BROKER_QUERY_ENABLE_NULL_HANDLING)); Review Comment: We may cache this property in a member variable to avoid per query lookup -- 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