Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v1] Make AstNode equals and hashcode abstract; add missing impls #1677

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions partiql-ast/api/partiql-ast.api
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,10 @@ public abstract class org/partiql/ast/AstEnum : org/partiql/ast/AstNode {
public abstract class org/partiql/ast/AstNode {
public fun <init> ()V
public abstract fun accept (Lorg/partiql/ast/AstVisitor;Ljava/lang/Object;)Ljava/lang/Object;
public abstract fun equals (Ljava/lang/Object;)Z
public abstract fun getChildren ()Ljava/util/List;
public fun getTag ()I
public abstract fun hashCode ()I
public fun setTag (I)V
}

Expand Down Expand Up @@ -886,7 +888,10 @@ public class org/partiql/ast/GroupBy$Key : org/partiql/ast/AstNode {
public fun <init> (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/Identifier;)V
public fun accept (Lorg/partiql/ast/AstVisitor;Ljava/lang/Object;)Ljava/lang/Object;
public static fun builder ()Lorg/partiql/ast/GroupBy$Key$Builder;
protected fun canEqual (Ljava/lang/Object;)Z
public fun equals (Ljava/lang/Object;)Z
public fun getChildren ()Ljava/util/List;
public fun hashCode ()I
}

public class org/partiql/ast/GroupBy$Key$Builder {
Expand Down Expand Up @@ -1001,7 +1006,10 @@ public class org/partiql/ast/Let$Binding : org/partiql/ast/AstNode {
public fun <init> (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/Identifier;)V
public fun accept (Lorg/partiql/ast/AstVisitor;Ljava/lang/Object;)Ljava/lang/Object;
public static fun builder ()Lorg/partiql/ast/Let$Binding$Builder;
protected fun canEqual (Ljava/lang/Object;)Z
public fun equals (Ljava/lang/Object;)Z
public fun getChildren ()Ljava/util/List;
public fun hashCode ()I
}

public class org/partiql/ast/Let$Binding$Builder {
Expand Down
6 changes: 6 additions & 0 deletions partiql-ast/src/main/java/org/partiql/ast/AstNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@ public void setTag(int tag) {
public abstract List<AstNode> getChildren();

public abstract <R, C> R accept(@NotNull AstVisitor<R, C> visitor, C ctx);

@Override
public abstract int hashCode();

@Override
public abstract boolean equals(Object obj);
}
1 change: 1 addition & 0 deletions partiql-ast/src/main/java/org/partiql/ast/GroupBy.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public <R, C> R accept(@NotNull AstVisitor<R, C> visitor, C ctx) {
* TODO docs, equals, hashcode
*/
@lombok.Builder(builderClassName = "Builder")
@EqualsAndHashCode(callSuper = false)
public static class Key extends AstNode {
@NotNull
public final Expr expr;
Expand Down
1 change: 1 addition & 0 deletions partiql-ast/src/main/java/org/partiql/ast/Let.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public <R, C> R accept(@NotNull AstVisitor<R, C> visitor, C ctx) {
* TODO docs, equals, hashcode
*/
@lombok.Builder(builderClassName = "Builder")
@EqualsAndHashCode(callSuper = false)
public static class Binding extends AstNode {
@NotNull
public final Expr expr;
Expand Down
Loading