raghavyadav01 commented on code in PR #14631:
URL: https://github.com/apache/pinot/pull/14631#discussion_r1884749913
##########
pinot-timeseries/pinot-timeseries-spi/src/main/java/org/apache/pinot/tsdb/spi/AggInfo.java:
##########
@@ -41,24 +40,47 @@
* Example usage:
* Map<String, String> params = new HashMap<>();
* params.put("window", "5m");
- * AggInfo aggInfo = new AggInfo("rate", params);
+ * AggInfo aggInfo = new AggInfo("rate", true, params);
*/
public class AggInfo {
private final String _aggFunction;
+ /**
+ * Denotes whether an aggregate is partial or full. When returning the
logical plan, language developers must not
+ * set this to true. This is used during Physical planning, and Pinot may
set this to true if the corresponding
+ * aggregate node is not guaranteed to have the full data. In such cases,
the physical plan will always add a
+ * complimentary full aggregate.
+ * <p>
+ * TODO(timeseries): Ideally we should remove this from the logical plan
completely.
+ * </p>
+ */
+ private final boolean _isPartial;
Review Comment:
Based on the _isPartial flag Users are expected to run
SeriesBuilderoperations. For example if _isPartial = true merge series based on
function which would produce final result for leaf phase.
Am I correct?
##########
pinot-timeseries/pinot-timeseries-planner/src/main/java/org/apache/pinot/tsdb/planner/TimeSeriesPlanFragmenter.java:
##########
@@ -102,8 +104,15 @@ public static List<BaseTimeSeriesPlanNode>
getFragments(BaseTimeSeriesPlanNode r
private static BaseTimeSeriesPlanNode
fragmentRecursively(BaseTimeSeriesPlanNode planNode, Context context) {
if (planNode instanceof LeafTimeSeriesPlanNode) {
LeafTimeSeriesPlanNode leafNode = (LeafTimeSeriesPlanNode) planNode;
- context._fragments.add(leafNode.withInputs(Collections.emptyList()));
- return new TimeSeriesExchangeNode(planNode.getId(),
Collections.emptyList(), leafNode.getAggInfo());
+ AggInfo currentAggInfo = leafNode.getAggInfo();
Review Comment:
Do Users have to specify or set isPartial flag while creating LeafPlanNode?
--
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]