Replies: 11 comments
-
We use a hand-written parser library sqlparser-rs so we can't provide an antlr4 syntax file. Would you like to get the table name from SQL? Not sure whether a generic SQL parser can do this @fengjiachun |
Beta Was this translation helpful? Give feedback.
-
I'm afraid generic SQL parser cannot handle our extended grammar |
Beta Was this translation helpful? Give feedback.
-
I think so. The main database sql antlr4 syntax file is provided here |
Beta Was this translation helpful? Give feedback.
-
Are you only parsing the SQL to get the table name? Maybe you can take a look at this. |
Beta Was this translation helpful? Give feedback.
-
需要解析ddl和dml 等语句信息,不只表名信息,我们是做一个大数据平台,接入各种数据源,平台统一支持校验权限和血缘, |
Beta Was this translation helpful? Give feedback.
-
Sorry, we don't have antlr4 syntax files |
Beta Was this translation helpful? Give feedback.
-
Our SQL dialect only modifies the syntax of creating table. I can fork an antlr4 syntax from other projects and make it work for greptimedb. Let me try it when I am free. |
Beta Was this translation helpful? Give feedback.
-
spark sql is based on the presto antrl syntax file, and doris is based on the spark antlr4 syntax file. |
Beta Was this translation helpful? Give feedback.
-
Cool, I'll try them. Thank you. |
Beta Was this translation helpful? Give feedback.
-
No. The most significant challenge is that we don't use such Grammar files in code so the compatibility is no guarantee. ANTLR doesn't have proper Rust impl. Two ideas we can follow:
This can be an open-ended discussion and I don't think we'd maintain such a file in the main repo. |
Beta Was this translation helpful? Give feedback.
-
What problem does the new feature solve?
no
What does the feature do?
Want to use java parsing sql syntax, obtain table information
Implementation challenges
No response
Beta Was this translation helpful? Give feedback.
All reactions