Open eKrajnak opened 2 months ago
The AST is notorious for having SQL syntax problems. I'll try to reproduce this locally and see if it can be patched.
@bossinc We might need to start exploring other options for the AST. I believe one of its main purposes is for extracting the table name (at least for adhoc filters). Maybe we can add a field to the SQL UI where people can manually write the table name. Or we can find a good Go module on the backend to handle it and use that to get an AST via HTTP request to the plugin.
Thank you. For INTERVAL 1 MINUTE I can use workaround "toIntervalMinute(1)" already now. But for SAMPLE I have no solution. I took a fast look on AST. If I'm correct it's AST plugin for Postgresql and it knows "TABLESAMPLE" with the very similar meaning. Maybe it could be just renamed.
The AST plugin is pretty flexible actually, maybe we can just add the keyword somewhere. Thanks for mentioning that
Any update about the issue?
No update yet, although I've been looking into alternatives for the AST parser since this is just one of many issues related to the current implementation
What happened: Clickhouse query which contains:
What you expected to happen: Apply adhoc filter and perform query
How to reproduce it (as minimally and precisely as possible):
Apply any adhoc filter and run the query:
and watch javascript console log:
Environment: