yashmayya commented on code in PR #19510:
URL: https://github.com/apache/pinot/pull/19510#discussion_r4030639342
##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java:
##########
@@ -120,6 +123,7 @@ public BaseBrokerRequestHandler(PinotConfiguration config,
String brokerId,
_tableCache = tableCache;
_threadAccountant = threadAccountant;
_multiClusterRoutingContext = multiClusterRoutingContext;
+ _approximateFunctionOverrideProvider = new
ApproximateFunctionOverrideProvider(config);
Review Comment:
Agreed on the end state, but threading it through the handler constructors
touches the documented override points that forks subclass, so I would rather
not do it here. The stray one is unused. Follow-up.
##########
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/ApproximateFunctionOverrideIntegrationTest.java:
##########
@@ -0,0 +1,202 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pinot.integration.tests;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import java.io.File;
+import java.util.List;
+import org.apache.commons.io.FileUtils;
+import org.apache.helix.model.HelixConfigScope;
+import org.apache.helix.model.builder.HelixConfigScopeBuilder;
+import org.apache.pinot.spi.config.table.TableConfig;
+import org.apache.pinot.spi.data.Schema;
+import org.apache.pinot.spi.utils.CommonConstants.Broker;
+import org.apache.pinot.util.TestUtils;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import static org.testng.Assert.assertEquals;
+
+
+/// End-to-end test of the cluster config that rewrites exact aggregations
into their approximate counterparts. It
+/// covers the two properties unit tests cannot show: the config takes effect
on a running broker without a restart,
+/// and the rewrite is invisible to the caller apart from the flag on the
response.
+public class ApproximateFunctionOverrideIntegrationTest extends
BaseClusterIntegrationTestSet {
Review Comment:
Agreed on both. The table layer is covered at unit level in
\`ApproximateFunctionOverrideProviderTest\`; the end-to-end layer and the MSE
asymmetry need table config edits mid-test, so follow-up along with the meter.
--
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]