ankitsultana commented on code in PR #13885: URL: https://github.com/apache/pinot/pull/13885#discussion_r1773080067
########## pinot-timeseries/pinot-timeseries-spi/src/main/java/org/apache/pinot/tsdb/spi/TimeSeriesLogicalPlanner.java: ########## @@ -0,0 +1,39 @@ +/** + * 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.tsdb.spi; + +import java.util.Map; +import org.apache.pinot.tsdb.spi.plan.BaseTimeSeriesPlanNode; +import org.apache.pinot.tsdb.spi.plan.ScanFilterAndProjectPlanNode; + + +/** + * Allows time-series query languages to implement their own logical planner. The input to this planner is a + * {@link RangeTimeSeriesRequest} and the output is a {@link TimeSeriesLogicalPlanResult}. Put simply, this abstraction + * takes in the query text and other parameters, and returns a logical plan which is a tree of + * {@link BaseTimeSeriesPlanNode}. Other than the plan-tree, the planner also returns a {@link TimeBuckets} which is + * the default TimeBuckets used by the query operators at runtime. Implementations are free to adjust them as they see + * fit. For instance, one query language might want to extend to the left or right of the time-range based on certain + * operators. Also, see {@link ScanFilterAndProjectPlanNode#getEffectiveFilter(TimeBuckets)}. + */ +public interface TimeSeriesLogicalPlanner { + void init(Map<String, Object> config); Review Comment: Yeah this can be done. Initially I was being a bit ambitious and thinking if I can even avoid the pinot-spi dependency for the timeseries-spi. But it was needed either ways so we can switch to PinotConfiguration now. Added a task here: https://github.com/apache/pinot/issues/13957 -- 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