You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "zihaoAK47 (via GitHub)" <gi...@apache.org> on 2023/06/03 13:33:04 UTC
[GitHub] [shardingsphere] zihaoAK47 opened a new issue, #26035: About parsing table names that contain backticks
zihaoAK47 opened a new issue, #26035:
URL: https://github.com/apache/shardingsphere/issues/26035
## About parsing table names that contain backticks
create table ```t_order` (i int)
Hi community, currently Shardingsphere cannot parse the SQL statement that contains a table name with backticks.
I have made changes to the corresponding parsing rules locally and now the SQL can be parsed correctly.
However, when writing tests, I found that Shardingsphere processes the table name as "t_order" instead of "`t_order" (with backticks) after calling the constructor of IdentifierValue, which invokes SQLUtils.getExactlyValue(text). Is this correct behavior?
============== Test out
java.lang.AssertionError:
SQL Case ID : create_table_with_backtick
SQL : CREATE TABLE ```t` (i int)
Table name assertion error:
Expected: is "`t"
but: was "t"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] RaigorJiang commented on issue #26035: About parsing table names that contain backticks
Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang commented on issue #26035:
URL: https://github.com/apache/shardingsphere/issues/26035#issuecomment-1576462894
Yes, `IdentifierValue` removes quotes by default, if the native `create` syntax supports special symbols, Can you submit a PR to improve it?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] RaigorJiang closed issue #26035: About parsing table names that contain backticks
Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang closed issue #26035: About parsing table names that contain backticks
URL: https://github.com/apache/shardingsphere/issues/26035
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] RaigorJiang commented on issue #26035: About parsing table names that contain backticks
Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang commented on issue #26035:
URL: https://github.com/apache/shardingsphere/issues/26035#issuecomment-1576565403
@zihaoAK47 Thank you!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] zihaoAK47 commented on issue #26035: About parsing table names that contain backticks
Posted by "zihaoAK47 (via GitHub)" <gi...@apache.org>.
zihaoAK47 commented on issue #26035:
URL: https://github.com/apache/shardingsphere/issues/26035#issuecomment-1576532615
> Yes, `IdentifierValue` removes quotes by default, if the native `create` syntax supports special symbols, Can you submit a PR to improve it?
Thank you for your reply. I will try to solve it ^_^
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org