xiangfu0 commented on code in PR #18649:
URL: https://github.com/apache/pinot/pull/18649#discussion_r3359503409


##########
pinot-spi/src/main/java/org/apache/pinot/spi/query/QueryProgressStats.java:
##########
@@ -0,0 +1,123 @@
+/**
+ * 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.spi.query;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Collection;
+import javax.annotation.Nullable;
+
+
+/// Progress for a running query.
+///
+/// The progress percentage is derived from processed work units over total 
work units. For single-stage queries, work
+/// units map to selected segments. For multi-stage queries, work units 
include selected segments and stage op-chains,
+/// because non-leaf stages can still be running after all leaf segments have 
been scanned. A negative percentage means
+/// the denominator is not known yet.
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class QueryProgressStats {
+  private final long _processedWorkUnits;

Review Comment:
   Keeping this as a class for now to preserve the existing get* accessor API 
on the pinot-spi/client-facing surface, especially after adding optional 
labels/details. The JSON shape stays compatible, and we can revisit a record 
conversion in a separate cleanup if we want that source-level churn.



-- 
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]

Reply via email to