walterddr commented on code in PR #11762:
URL: https://github.com/apache/pinot/pull/11762#discussion_r1355312354
##########
pinot-core/src/main/java/org/apache/pinot/core/query/reduce/AggregationDataTableReducer.java:
##########
@@ -47,9 +45,12 @@
@SuppressWarnings({"rawtypes", "unchecked"})
public class AggregationDataTableReducer implements DataTableReducer {
private final QueryContext _queryContext;
+ private final AggregationFunction[] _aggregationFunctions;
- AggregationDataTableReducer(QueryContext queryContext) {
+ public AggregationDataTableReducer(QueryContext queryContext) {
Review Comment:
this and below: is public access needed? (not seeing any changes in how
contructors are used
##########
pinot-core/src/main/java/org/apache/pinot/core/query/reduce/BrokerReduceService.java:
##########
@@ -99,8 +119,23 @@ public BrokerResponseNative reduceOnDataTable(BrokerRequest
brokerRequest, Broke
// Set execution statistics and Update broker metrics.
aggregator.setStats(rawTableName, brokerResponseNative, brokerMetrics);
+ // Report the servers with conflicting data schema.
+ if (!serversWithConflictingDataSchema.isEmpty()) {
+ String errorMessage =
+ String.format("%s: responses for table: %s from servers: %s got
dropped due to data schema inconsistency.",
+ QueryException.MERGE_RESPONSE_ERROR.getMessage(), tableName,
serversWithConflictingDataSchema);
+ LOGGER.warn(errorMessage);
+ if (brokerMetrics != null) {
+ brokerMetrics.addMeteredTableValue(rawTableName,
BrokerMeter.RESPONSE_MERGE_EXCEPTIONS, 1L);
+ }
+ brokerResponseNative.addToExceptions(
+ new
QueryProcessingException(QueryException.MERGE_RESPONSE_ERROR_CODE,
errorMessage));
+ }
+
// NOTE: When there is no cached data schema, that means all servers
encountered exception. In such case, return the
// response with metadata only.
+ DataSchema cachedDataSchema =
Review Comment:
(nit) notes are for line 139?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]