-
Notifications
You must be signed in to change notification settings - Fork 628
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
SQL: placeholder in identifier #3169
Comments
Where can I find the definition of SQL syntax for When extending a parser, I need information about the syntax.
"such as" is not enough to extend the parser. |
I didn't find the strict definition but a page in the hive language mannual: |
Thank you for the information. |
Close universal-ctags#3169. Some? dialects support shell-like variable substitution. HiveQL is one of such dialects. https://cwiki.apache.org/confluence/display/Hive/LanguageManual+VariableSubstitution With this change, the SQL parser accepts '${var}' as a part of an identifier. TODO: `var` itself can be extracted as a reference tag. Signed-off-by: Masatake YAMATO <[email protected]>
Close universal-ctags#3169. Some? dialects support shell-like variable substitution. HiveQL is one of such dialects. https://cwiki.apache.org/confluence/display/Hive/LanguageManual+VariableSubstitution With this change, the SQL parser accepts '${var}' as a part of an identifier. TODO: `var` itself can be extracted as a reference tag. Signed-off-by: Masatake YAMATO <[email protected]>
See #3172.
|
Close universal-ctags#3169. Some? dialects support shell-like variable substitution. HiveQL is one of such dialects. https://cwiki.apache.org/confluence/display/Hive/LanguageManual+VariableSubstitution With this change, the SQL parser accepts '${var}' as a part of an identifier. TODO: `var` itself can be extracted as a reference tag. Signed-off-by: Masatake YAMATO <[email protected]>
Close universal-ctags#3169. Some? dialects support shell-like variable substitution. HiveQL is one of such dialects. https://cwiki.apache.org/confluence/display/Hive/LanguageManual+VariableSubstitution With this change, the SQL parser accepts '${var}' as a part of an identifier. TODO: `var` itself can be extracted as a reference tag. Signed-off-by: Masatake YAMATO <[email protected]>
Close universal-ctags#3169. Some? dialects support shell-like variable substitution. HiveQL is one of such dialects. https://cwiki.apache.org/confluence/display/Hive/LanguageManual+VariableSubstitution With this change, the SQL parser accepts '${var}' as a part of an identifier. TODO: `var` itself can be extracted as a reference tag. Signed-off-by: Masatake YAMATO <[email protected]>
Close universal-ctags#3169. Some(?) dialects support shell-like variable substitution. HiveQL is one of such dialects. https://cwiki.apache.org/confluence/display/Hive/LanguageManual+VariableSubstitution With this change, the SQL parser accepts '${var}' as a part of an identifier. TODO: `var` itself can be extracted as a reference tag. Signed-off-by: Masatake YAMATO <[email protected]>
Sorry for the late reply. I was on vacation. It works like a charm, and thanks again for your immediate response. |
I would like to get the answer to this question. |
I believe it's not HiveQL specific. This problem emerges while I am using an in-company ad hoc query tool with spark and presto query engines on hive tables. In my experience, sql dialects of Spark, Presto and Hive all support variable substitution. And I just use '.sql' as file name extension. |
Thank you. |
I looked into Presto a bit. |
About, spark and presto, we cannot find the syntax definition for I focus on Hive. I wonder whether we can say "ctags supports HiveSQL". I had some questions.
I found .q is used. https://github.com/apache/hive/blob/ac4020789149115c71bcee9b85577fff7dd01f46/ql/src/test/queries/clientnegative/materialized_view_create_failure.q How do you think about this? Just parsing I think the change in #3172 is too ad-hoc. So I wonder whether I should merge the pull request or not. |
After seme researching I guess you write about hplsql. Am I correct? |
Hi dear ctags developers,
I run into a problem while generating tags for the following SQL script with placeholder:
table 'tb_name${dt}' is not parsed as an identifier, and the same situation occurs to column name. Would you consider enhancing the sql parser to allow identifier with placeholder such as '${a_1}' ?
Thanks.
The text was updated successfully, but these errors were encountered: