Get Non CTE expressions #1795
-
I have two questions:
This works for SQL where aliases are used such as
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Yes, you need to run the query through the optimizer and it'll resolve each column reference, qualifying it accordingly.
I'm not sure what "non-CTEs" means. If you don't want the CTEs of the query you can pop the |
Beta Was this translation helpful? Give feedback.
Yes, you need to run the query through the optimizer and it'll resolve each column reference, qualifying it accordingly.
I'm not sure what "non-CTEs" means. If you don't want the CTEs of the query you can pop the
"with"
arg of eachexp.Select
expression in the AST of interest. Note that this will mutate the AST, so consider copying it first if you don't want that (or just use thetransform
method, since it automatically copies the input expression before transforming it).