atris commented on code in PR #8466: URL: https://github.com/apache/pinot/pull/8466#discussion_r843455850
########## pinot-core/src/main/java/org/apache/pinot/core/plan/FilterPlanNode.java: ########## @@ -195,6 +195,14 @@ private BaseFilterOperator constructPhysicalOperator(FilterContext filter, int n return FilterOperatorUtils.getLeafFilterOperator(predicateEvaluator, dataSource, numDocs); } switch (predicate.getType()) { + case CONTAINS: + if (dataSource.getTextIndex() != null) { + // For now, CONTAINS is executed by the TEXT_MATCH operator. With integration of native text indices + // the type of operator used will depend on the type of the underlying text index. + return new TextMatchFilterOperator(dataSource.getTextIndex(), (TextMatchPredicate) predicate, numDocs); + } + + throw new UnsupportedOperationException("CONTAINS is supported only on text index enabled fields"); Review Comment: We will eventually have to take this path. We cannot base an operator on the type of underlying index. IMO CONTAINS will work on top of Lucene text index by converting to text match operator, and for native index, use a new operator. -- 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