x1ng-z opened a new issue, #37797:
URL: https://github.com/apache/shardingsphere/issues/37797

   ## Bug Report
   
   
   ### Which version of ShardingSphere did you use?
   5.5.2
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-JDBC
   ### Expected behavior
   when using sharding-jdbc to execute fellowing sql, it throws error. the 
target database type is sqlserver.
   Here is error message:
   aused by: 
org.apache.shardingsphere.infra.exception.dialect.exception.syntax.sql.DialectSQLParsingException:
 You have an error in your SQL syntax: SELECT rp.ID, rp.CODE FROM R_PARTBOM AS 
rp WITH(NOLOCK) JOIN S_OPERATOR AS rpm ON rp.MEId = rpm.ID WHERE 1 = 1, null
        at 
org.apache.shardingsphere.infra.parser.ShardingSphereSQLParserEngine.getException(ShardingSphereSQLParserEngine.java:66)
        at 
org.apache.shardingsphere.infra.parser.ShardingSphereSQLParserEngine.parse(ShardingSphereSQLParserEngine.java:59)
        at 
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.parseSQL(ShardingSpherePreparedStatement.java:160)
        at 
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.<init>(ShardingSpherePreparedStatement.java:142)
        at 
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.<init>(ShardingSpherePreparedStatement.java:115)
        at 
org.apache.shardingsphere.driver.jdbc.core.connection.ShardingSphereConnection.prepareStatement(ShardingSphereConnection.java:108)
        at 
com.zaxxer.hikari.pool.ProxyConnection.prepareStatement(ProxyConnection.java:328)
        at 
com.zaxxer.hikari.pool.HikariProxyConnection.prepareStatement(HikariProxyConnection.java)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:569)
        at 
org.apache.ibatis.logging.jdbc.ConnectionLogger.invoke(ConnectionLogger.java:53)
        at jdk.proxy3/jdk.proxy3.$Proxy218.prepareStatement(Unknown Source)
        at 
org.apache.ibatis.executor.statement.PreparedStatementHandler.instantiateStatement(PreparedStatementHandler.java:88)
        at 
org.apache.ibatis.executor.statement.BaseStatementHandler.prepare(BaseStatementHandler.java:90)
   ### Actual behavior
   the actual sql that set in preparedstatement is :
    SELECT rp.ID, rp.CODE FROM R_PARTBOM AS rp WITH(NOLOCK) JOIN S_OPERATOR AS 
rpm ON rp.MEId = rpm.ID WHERE 1 = 1
   But error shows sql is  
    SELECT rp.ID, rp.CODE FROM R_PARTBOM AS rp WITH(NOLOCK) JOIN S_OPERATOR AS 
rpm ON rp.MEId = rpm.ID WHERE 1 = 1, null
   when I remove join part sentence: SELECT rp.ID, rp.CODE FROM R_PARTBOM AS rp 
WITH(NOLOCK) WHERE 1 = 1
   it work well.
   So I have a question about is sharding-jdbc support join keyword for 
sqlserver?
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   
   ### Example codes for reproduce this issue (such as a github link).
   


-- 
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: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to