-
Notifications
You must be signed in to change notification settings - Fork 542
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
Parsing of SQL Functions body #1356
Comments
I think you could parse the dollar quoted string again with SQLParser as a potential workaround 🤔 |
I am not sure I understood, what result would you expect from that? I have found some solutions out there, but they involve compiling against Postgres, which seems overkill. |
I am probably confused. I thought the issue was that SQLParser returned the function body as a large string but you wanted it as parsed SQL AST nodes So i was thinking you could run the parser again, something like the following psuedo code let create_function = parser.parse(input_sql)
// run parser again to parse function body as into AST
let function_body_as_ast = parser.parser(create_function.function_body....value); |
I can try that! |
It is my understanding that the current implementation of CREATE FUNCTION does not support the parsing of function blocks.
For instance, the following function body gets converted to a simple
DollarQuotedString
, as shown below. I need to be able to parse the function bodies to write any script that may be able to execute them, so I will be getting started doing that - is there any pull request that has already attempted this that I should be aware of?The text was updated successfully, but these errors were encountered: