lcfliuxi opened a new issue, #33452:
URL: https://github.com/apache/shardingsphere/issues/33452

   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub 
issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere 
Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more 
details. 
   If no response anymore and we cannot reproduce it on current information, we 
will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   5.5.0
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-JDBC
   ### Expected behavior
   Execute SELECT COUNT(*) AS total FROM dwd_urls_search WHERE id > 0 AND 
EXTRACT(ISOYEAR FROM create_time) = 2024 AND EXTRACT(WEEK FROM create_time) = 
27; successfully for PostgreSQL.
   Execute SELECT EXTRACT(QUARTER TIMESTAMP '2001-02-16 20:38:40'); 
successfully for PostgreSQL.
   ### Actual behavior
   Caused by: 
org.apache.shardingsphere.infra.exception.dialect.exception.syntax.sql.DialectSQLParsingException:
 You have an error in your SQL syntax: no viable alternative at input 
'SELECTCOUNT(*)AStotalFROMdwd_urls_searchWHEREid>0ANDEXTRACT(ISOYEARFROMcreate_time)=2024ANDEXTRACT(WEEK'
        at 
org.apache.shardingsphere.infra.parser.ShardingSphereSQLParserEngine.parse(ShardingSphereSQLParserEngine.java:60)
        at 
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.<init>(ShardingSpherePreparedStatement.java:206)
        at 
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.<init>(ShardingSpherePreparedStatement.java:172)
        at 
org.apache.shardingsphere.driver.jdbc.core.connection.ShardingSphereConnection.prepareStatement(ShardingSphereConnection.java:94)
        at sun.reflect.GeneratedMethodAccessor88.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
org.apache.ibatis.logging.jdbc.ConnectionLogger.invoke(ConnectionLogger.java:55)
        at com.sun.proxy.$Proxy94.prepareStatement(Unknown Source)
        at 
org.apache.ibatis.executor.statement.PreparedStatementHandler.instantiateStatement(PreparedStatementHandler.java:86)
        at 
org.apache.ibatis.executor.statement.BaseStatementHandler.prepare(BaseStatementHandler.java:88)
        ... 178 more
   ### Reason analyze (If you can)
   This issue is similar to 
[issue16851](https://github.com/apache/shardingsphere/issues/16851)
   ### 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