-
Notifications
You must be signed in to change notification settings - Fork 2
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
关于clickhouse jdbc 不同驱动返回表名不同的问题 #3
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
、
今天分析了一下 ,遇到的一些问题。
官方驱动提供jdbc驱动有两个,一个是官方驱动,一个是第三方驱动
官方驱动如下
第三方驱动 是Clickhouse-Nativa-jdbc 和 clickhouse4j
就你提到的这个问题 执行时rsmd.getTableName返回"‘Comment’"
经过验证和测试。
sql语句不变,还是issuse里的。
使用clickhouse4j 执行rsmd.getTableName返回"‘Comment’",有反引号
而使用官方驱动 clickhouse-jdbc 返回的是 "Comment",没有反引号
所以这个问题 ,如果在getQuote()中去掉"`",那么clickhouse生成的sql 语句都没有反引号。
或许这样改是否合适一点,生成的sql保留反引号,在进行判断的时候如果使用的jdbc驱动是clickhouse4j ,获取的表名是有反引号的。将它截取下来再比较。
因为clickhosue官方有一句话:
说明clickhouse是支持表同名的。并且必须要使用反引号或者双引号。
The text was updated successfully, but these errors were encountered: