kishoreg commented on a change in pull request #6376: URL: https://github.com/apache/incubator-pinot/pull/6376#discussion_r547704563
########## File path: pinot-core/src/main/java/org/apache/pinot/core/operator/filter/H3IndexFilterOperator.java ########## @@ -0,0 +1,148 @@ +/** + * 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.core.operator.filter; + +import com.uber.h3core.H3Core; +import com.uber.h3core.LengthUnit; +import java.io.IOException; +import java.util.List; +import org.apache.pinot.core.common.DataSource; +import org.apache.pinot.core.geospatial.serde.GeometrySerializer; +import org.apache.pinot.core.geospatial.transform.function.StPointFunction; +import org.apache.pinot.core.indexsegment.IndexSegment; +import org.apache.pinot.core.operator.blocks.FilterBlock; +import org.apache.pinot.core.operator.docidsets.BitmapDocIdSet; +import org.apache.pinot.core.query.request.context.ExpressionContext; +import org.apache.pinot.core.query.request.context.FunctionContext; +import org.apache.pinot.core.query.request.context.predicate.GeoPredicate; +import org.apache.pinot.core.query.request.context.predicate.Predicate; +import org.apache.pinot.core.query.request.context.predicate.RangePredicate; +import org.apache.pinot.core.segment.index.readers.geospatial.H3IndexReader; +import org.apache.pinot.spi.utils.BytesUtils; +import org.locationtech.jts.geom.Geometry; +import org.roaringbitmap.buffer.ImmutableRoaringBitmap; +import org.roaringbitmap.buffer.MutableRoaringBitmap; + + +public class H3IndexFilterOperator extends BaseFilterOperator { + private static final String OPERATOR_NAME = "H3IndexFilterOperator"; + + // NOTE: Range index can only apply to dictionary-encoded columns for now + // TODO: Support raw index columns + private final int _numDocs; + private final H3Core _h3Core; + private final H3IndexReader _h3IndexReader; + private Geometry _geometry; + private double _distance; + + public H3IndexFilterOperator(Predicate predicate, IndexSegment indexSegment, int numDocs) { + FunctionContext function = predicate.getLhs().getFunction(); + String columnName; + + if (function.getArguments().get(0).getType() == ExpressionContext.Type.IDENTIFIER) { Review comment: Not yet but its possible to handle them ---------------------------------------------------------------- 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. 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