public static boolean equivalent(
      Expression left, Expression right, Types.StructType struct, boolean caseSensitive) {
    return Binder.bind(struct, Expressions.rewriteNot(left), caseSensitive)
        .isEquivalentTo(Binder.bind(struct, Expressions.rewriteNot(right), caseSensitive));
  }
@Test
  public void testNotEquivalence() {
    assertThat(
            ExpressionUtil.equivalent(
                Expressions.not(
                    Expressions.or(
                        Expressions.in("data", "a"), Expressions.greaterThanOrEqual("id", 34))),
                Expressions.and(Expressions.lessThan("id", 34L), Expressions.notEqual("data", "a")),
                STRUCT,
                true))
        .as("Should detect not equivalence by rewriting")
        .isTrue();
  }