@Override
  public TreeNode visitBooleanWrappedExpression(PartitionFilterParser.BooleanWrappedExpressionContext ctx) {
    // Visit the inner expression and check if "NOT" is used
    TreeNode innerNode = (TreeNode) visit(ctx.orExpression());
    boolean isNot = ctx.NOT() != null;
    boolean parsedBoolean = Boolean.parseBoolean(ctx.booleanLiteral().getText());

    // Return the node based on the expected boolean value (negated or not)
    return parsedBoolean != isNot ? innerNode : negateTree(innerNode);
  }
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