private static List<Expression> crossProductOfDisjunctiveNormalForms(
      List<Expression> leftList, List<Expression> rightList, Operator operator) {
    List<Expression> results = new ArrayList<>();
    for (Expression leftExp : leftList) {
      for (Expression rightExp : rightList) {
        List<Expression> terms = new ArrayList<>();
        if (leftExp instanceof LogicalExpression) {
          terms.addAll(((LogicalExpression) leftExp).getTerms());
        } else {
          terms.add(leftExp);
        }

        if (rightExp instanceof LogicalExpression) {
          terms.addAll(((LogicalExpression) rightExp).getTerms());
        } else {
          terms.add(rightExp);
        }

        results.add(new LogicalExpression(operator, terms));
      }
    }
    return results;
  }
Convert to a disjunctive normal forms.

<p>For example: ( A | B ) & ( C | D ) => ( A & C ) | ( A & D ) | ( B & C ) | ( B & D)

<p>Returns the original expression if the expression is null or if the distribution will expand
the expression by too much.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/AnalyzeUtils.java