@Override
  public TreeNode visitBooleanCondition(PartitionFilterParser.BooleanConditionContext ctx) {
    TreeNode exprNode = (TreeNode) visit(ctx.expression());
    boolean isNegated = ctx.NOT() != null;  // Check for negation (NOT)
    boolean parsedBoolean = Boolean.parseBoolean(ctx.booleanLiteral().getText());

    // For TRUE case: return expression directly if not negated, otherwise negate it
    // For FALSE case: return negated expression if not negated, otherwise return as is
    return (parsedBoolean != isNegated) ? exprNode : negateTree(exprNode);
  }
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