private static boolean joinComparisonExpression(
      Expression expression,
      Collection<Symbol> leftSymbols,
      Collection<Symbol> rightSymbols,
      Set<ComparisonExpression.Operator> operators) {
    // At this point in time, our join predicates need to be deterministic
    if (expression instanceof ComparisonExpression && isDeterministic(expression)) {
      ComparisonExpression comparison = (ComparisonExpression) expression;
      if (operators.contains(comparison.getOperator())) {
        Set<Symbol> symbols1 = extractUnique(comparison.getLeft());
        Set<Symbol> symbols2 = extractUnique(comparison.getRight());
        if (symbols1.isEmpty() || symbols2.isEmpty()) {
          return false;
        }
        return (leftSymbols.containsAll(symbols1) && rightSymbols.containsAll(symbols2))
            || (rightSymbols.containsAll(symbols1) && leftSymbols.containsAll(symbols2));
      }
    }
    return false;
  }
If the expression is EQUAL ComparisonExpression

@return true if the expression is EQUAL ComparisonExpression and leftSymbols contains
    expression.getLeft() and rightSymbols contains expression.getRight().
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/JoinUtils.java