Skip to content

Commit

Permalink
[wip] add AstRewriter; 266 plan tests failing
Browse files Browse the repository at this point in the history
  • Loading branch information
alancai98 committed Oct 29, 2024
1 parent 46eb17f commit dfc1db7
Show file tree
Hide file tree
Showing 9 changed files with 907 additions and 86 deletions.
11 changes: 11 additions & 0 deletions partiql-ast/src/main/java/org/partiql/ast/v1/QueryBody.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@
import java.util.List;

public abstract class QueryBody extends AstNode {
@Override
public <R, C> R accept(@NotNull AstVisitor<R, C> visitor, C ctx) {
if (this instanceof QueryBody.SFW) {
return visitor.visitQueryBodySFW((QueryBody.SFW) this, ctx);
} else if (this instanceof QueryBody.SetOp) {
return visitor.visitQueryBodySetOp((QueryBody.SetOp) this, ctx);
} else {
throw new IllegalStateException("Unknown QueryBody type: " + this.getClass().getName());
}
}

@Builder(builderClassName = "Builder")
@EqualsAndHashCode(callSuper = false)
public static class SFW extends QueryBody {
Expand Down
Loading

0 comments on commit dfc1db7

Please sign in to comment.