@Override
  public TreeNode visitInConditionWithBoolean(PartitionFilterParser.InConditionWithBooleanContext ctx) {
    List<Object> values = visitConstantSeq(ctx.constantSeq());
    String keyName = (String) visit(ctx.key);
    // Determine if the condition is a NOT IN by checking the presence of the NOT keyword
    boolean isNotIn = !ctx.NOT().isEmpty();
    boolean parsedBoolean = Boolean.parseBoolean(ctx.booleanLiteral().getText());

    // If the boolean literal is TRUE, the condition should be IN, otherwise NOT IN
    return buildInCondition(keyName, values, parsedBoolean != isNotIn);
  }
Override the default behavior for all visit methods. This will only return a non-null result
when the context has only one child. This is done because there is no generic method to
combine the results of the context children. In all other cases null is returned.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/parser/PartFilterVisitor.java