Class CalciteCnfHelper


  • public class CalciteCnfHelper
    extends Object
    All functions in this class were basically adopted from Apache Calcite and modified to use them in Druid. See https://github.com/apache/calcite/blob/branch-1.21/core/src/main/java/org/apache/calcite/rex/RexUtil.java#L1615 for original implementation.
    • Method Detail

      • conjunctions

        public static List<Filter> conjunctions​(Filter rexPredicate)
        Returns a condition decomposed by AND.

        For example, conjunctions(TRUE) returns the empty list; conjunctions(FALSE) returns list {FALSE}.

      • decomposeConjunction

        public static void decomposeConjunction​(Filter rexPredicate,
                                                List<Filter> rexList)
        Decomposes a predicate into a list of expressions that are AND'ed together.
        Parameters:
        rexPredicate - predicate to be analyzed
        rexList - list of decomposed RexNodes