You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/08/30 01:32:25 UTC

[GitHub] [shardingsphere] wushifeng commented on issue #12056: V4.1.1 version, when use "LEFT JOIN" in sql, SQL rewrite error

wushifeng commented on issue #12056:
URL: https://github.com/apache/shardingsphere/issues/12056#issuecomment-907942429


   If Use shardingsphere-5, sql gramamer file is too old:
   for example: BaseRule.g4
   In 5.0.0-beta version:
   shardingsphere-5.0.0-beta\shardingsphere-sql-parser\shardingsphere-sql-parser-dialect\shardingsphere-sql-parser-mysql\src\main\antlr4\imports\mysql\BaseRule.g4
   
   regularFunctionName
       : IF | LOCALTIME | LOCALTIMESTAMP | REPLACE | INTERVAL | MOD
       | DATABASE | SCHEMA | LEFT | RIGHT | DATE | DAY | GEOMETRYCOLLECTION
       | LINESTRING | MULTILINESTRING | MULTIPOINT | MULTIPOLYGON | POINT | POLYGON
       | TIME | TIMESTAMP | TIMESTAMP_ADD | TIMESTAMP_DIFF | DATE | CURRENT_TIMESTAMP | identifier
       ;
   
   in 4.1.0-4.1.1 version:
   shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/antlr4/imports/mysql/BaseRule.g4
   regularFunctionName_ has many syntax.
   
   So if use the sql below:
   	INSERT INTO TB_USR (END_DATE) VALUES ( STR_TO_DATE(?, '%Y-%m-%d %H:%i:%s.%f') )
   
   4.1.0-4.1.1 version can work, but 5.0.0-beta not, how to deal with this situation?


-- 
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