Class FilterOperator

  • All Implemented Interfaces:
    java.lang.Comparable<FilterOperator>
    Direct Known Subclasses:
    FunctionOperator

    public class FilterOperator
    extends java.lang.Object
    implements java.lang.Comparable<FilterOperator>
    This class is for filter in where clause. It may consist of more than two child FilterOperators, but if it's not a leaf operator, the relation is the same among all of its children (AND or OR), which is identified by tokenType.
    • Method Detail

      • getFilterName

        public java.lang.String getFilterName()
      • getFilterSymbol

        public java.lang.String getFilterSymbol()
      • setChildren

        public void setChildren​(java.util.List<FilterOperator> children)
      • setIsSingle

        public void setIsSingle​(boolean b)
      • getSinglePath

        public org.apache.iotdb.commons.path.PartialPath getSinglePath()
      • setSinglePath

        public void setSinglePath​(org.apache.iotdb.commons.path.PartialPath singlePath)
      • addChildOperator

        public void addChildOperator​(FilterOperator op)
      • setPathSet

        public void setPathSet​(java.util.Set<org.apache.iotdb.commons.path.PartialPath> pathSet)
      • getPathSet

        public java.util.Set<org.apache.iotdb.commons.path.PartialPath> getPathSet()
      • transformToExpression

        public org.apache.iotdb.tsfile.read.expression.IExpression transformToExpression​(java.util.Map<org.apache.iotdb.commons.path.PartialPath,​org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> pathTSDataTypeHashMap)
                                                                                  throws QueryProcessException
        For a filter operator, if isSingle, call transformToSingleQueryFilter.
        FilterOperator cannot be leaf.
        Parameters:
        pathTSDataTypeHashMap -
        Returns:
        QueryFilter in TsFile
        Throws:
        QueryProcessException
      • transformToSingleQueryFilter

        protected org.apache.iotdb.tsfile.utils.Pair<org.apache.iotdb.tsfile.read.expression.IUnaryExpression,​java.lang.String> transformToSingleQueryFilter​(java.util.Map<org.apache.iotdb.commons.path.PartialPath,​org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> pathTSDataTypeHashMap)
                                                                                                                                                            throws LogicalOperatorException,
                                                                                                                                                                   org.apache.iotdb.commons.exception.MetadataException
        it will be used in BasicFunction Operator.
        Parameters:
        pathTSDataTypeHashMap -
        Returns:
        - pair.left: UnaryQueryFilter constructed by its one child; pair.right: Path represented by this child.
        Throws:
        org.apache.iotdb.commons.exception.MetadataException - exception in filter transforming
        LogicalOperatorException
      • compareTo

        public int compareTo​(FilterOperator fil)
        a filter with null path is no smaller than any other filter.
        Specified by:
        compareTo in interface java.lang.Comparable<FilterOperator>
      • equals

        public boolean equals​(java.lang.Object fil)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • isLeaf

        public boolean isLeaf()
      • isSingle

        public boolean isSingle()
      • showTree

        public java.lang.String showTree()
      • showTree

        public java.lang.String showTree​(int spaceNum)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object