Make PredicateStitcher implement more AstVisitor nodes
See original GitHub issuePredicateStitcher should be able to re-construct the entire AST of a Query
after mutating a Table
node with predicates stitched.
The general idea is to implement the AST ancestors of Table
upwards till Query
, plus the AST ancestors of every base node of every AST ancestor of Table
. To put it recursively, if node
is in the set, also include the AST parent of node
as well as the AST parents of the node
’s base classes.
The following AstVisitor methods are yet to be implemented.
visitExcept()
visitIntersect()
visitSampledRelation()
visitLateral()
visitValues() or visitRelation()
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
What's the best way to implement AST using visitor pattern ...
The Visitor can have member that it can use to store result, something like: class AstNodeVisitor { public: void visitCompareNode(CompareNode& node) ...
Read more >ASTVisitor (Eclipse JDT API Specification) - IBM
A visitor for abstract syntax trees. For each different concrete AST node type T there are a pair of methods: public boolean visit(T...
Read more >Initial support for lateral joins · Issue #5879 · prestodb/presto
Introduce LATERAL keyword in syntax, make Join have a isLateral property ... Make PredicateStitcher implement more AstVisitor nodes #16608.
Read more >APT APT_32 APT_3_1_1_branch APT_3_1_1_maintenance ...
path: root/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTVisitor.java ... to watch out for: * <ul> * <li>Moving a child node further down the list.
Read more >Ast.Visit Method (System.Management.Automation.Language)
Visit each node in the Ast, calling the methods in astVisitor for each node in the ast.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@gggrace14 I’m unable to edit this issue. Here’s something we can add:
We do not support subqueries within WHERE clause. E.g.:
For this, we need to implement visit for all types of expressions. These can also be implemented via joins and we do not have enough usecases to support these type of queries.
Hi @pranjalssh , can you add a short description to this Issue of your findings of query in predicate not being support as well as our current thought? That will complete this Issue and reflect our up-to-date decision. https://github.com/prestodb/presto/blob/14126619596162e18ec8099f4f911f9e5836880b/presto-parser/src/main/antlr4/com/facebook/presto/sql/parser/SqlBase.g4#L345-L348