You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ro...@apache.org on 2022/10/18 22:00:41 UTC

[pinot] branch master updated: remove more unused filter code (#9620)

This is an automated email from the ASF dual-hosted git repository.

rongr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new e7159699d1 remove more unused filter code (#9620)
e7159699d1 is described below

commit e7159699d187238045a6d90c83afdff72e8aaff3
Author: Almog Gavra <al...@gmail.com>
AuthorDate: Tue Oct 18 15:00:34 2022 -0700

    remove more unused filter code (#9620)
---
 .../filter/FunctionEvaluatorRecordFilter.java      | 46 ----------------------
 .../processing/filter/NoOpRecordFilter.java        | 33 ----------------
 .../segment/processing/filter/RecordFilter.java    | 33 ----------------
 3 files changed, 112 deletions(-)

diff --git a/pinot-core/src/main/java/org/apache/pinot/core/segment/processing/filter/FunctionEvaluatorRecordFilter.java b/pinot-core/src/main/java/org/apache/pinot/core/segment/processing/filter/FunctionEvaluatorRecordFilter.java
deleted file mode 100644
index 90fe8a2fb8..0000000000
--- a/pinot-core/src/main/java/org/apache/pinot/core/segment/processing/filter/FunctionEvaluatorRecordFilter.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.segment.processing.filter;
-
-import org.apache.pinot.segment.local.function.FunctionEvaluator;
-import org.apache.pinot.segment.local.function.FunctionEvaluatorFactory;
-import org.apache.pinot.spi.data.readers.GenericRow;
-
-
-/**
- * RecordFilter which evaluates the filter function to decide whether record should be skipped or not.
- * The filter function is expected to evaluate to true, if the record should be filtered
- */
-public class FunctionEvaluatorRecordFilter implements RecordFilter {
-
-  private final FunctionEvaluator _filterFunctionEvaluator;
-
-  public FunctionEvaluatorRecordFilter(String filterFunction) {
-    _filterFunctionEvaluator = FunctionEvaluatorFactory.getExpressionEvaluator(filterFunction);
-  }
-
-  @Override
-  public boolean filter(GenericRow row) {
-    if (_filterFunctionEvaluator != null) {
-      Object filter = _filterFunctionEvaluator.evaluate(row);
-      return Boolean.TRUE.equals(filter);
-    }
-    return false;
-  }
-}
diff --git a/pinot-core/src/main/java/org/apache/pinot/core/segment/processing/filter/NoOpRecordFilter.java b/pinot-core/src/main/java/org/apache/pinot/core/segment/processing/filter/NoOpRecordFilter.java
deleted file mode 100644
index 6ee6c7964c..0000000000
--- a/pinot-core/src/main/java/org/apache/pinot/core/segment/processing/filter/NoOpRecordFilter.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * 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.segment.processing.filter;
-
-import org.apache.pinot.spi.data.readers.GenericRow;
-
-
-/**
- * Record filter which doesn't filter out any records
- */
-public class NoOpRecordFilter implements RecordFilter {
-
-  @Override
-  public boolean filter(GenericRow row) {
-    return false;
-  }
-}
diff --git a/pinot-core/src/main/java/org/apache/pinot/core/segment/processing/filter/RecordFilter.java b/pinot-core/src/main/java/org/apache/pinot/core/segment/processing/filter/RecordFilter.java
deleted file mode 100644
index d5a25e77ad..0000000000
--- a/pinot-core/src/main/java/org/apache/pinot/core/segment/processing/filter/RecordFilter.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * 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.segment.processing.filter;
-
-import org.apache.pinot.spi.data.readers.GenericRow;
-
-
-/**
- * Used for filtering records in the mapper
- */
-public interface RecordFilter {
-
-  /**
-   * Returns true if given record should be filtered out
-   */
-  boolean filter(GenericRow row);
-}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org