private static IDPredicate getIdPredicate(
      ComparisonExpression comparisonExpression, Expression right, int idColumnOrdinal) {
    if (comparisonExpression.getOperator() != ComparisonExpression.Operator.EQUAL) {
      throw new SemanticException("The operator of tag predicate must be '=' for " + right);
    }

    String rightHandValue;
    if (right instanceof StringLiteral) {
      rightHandValue = ((StringLiteral) right).getValue();
    } else if (right instanceof NullLiteral) {
      throw new SemanticException(
          "The right hand value of tag predicate cannot be null with '=' operator, please use 'IS NULL' instead");
    } else {
      throw new SemanticException(
          "The right hand value of tag predicate must be a string: " + right);
    }
    // the first segment is the table name, so + 1
    return new SegmentExactMatch(rightHandValue, idColumnOrdinal + 1);
  }
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