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/02/02 11:13:42 UTC

[GitHub] [shardingsphere] wzdlagrange opened a new issue #9275: Sharding JDBC4.0.1 SQL中出现类似lower(user_id) = lower(trim(?))时,解析会出错

wzdlagrange opened a new issue #9275:
URL: https://github.com/apache/shardingsphere/issues/9275


   解析lower(trim(?))时
   PredicateExtractor.extractPredicate方法 140行
   Optional<ColumnSegment> column = columnExtractor.extract((ParserRuleContext) predicateNode.get().getChild(0), parameterMarkerIndexes);
   其中predicateNode.get() 得到的
   解析出来的是7个ErrorNodeImpl
   分别为:lower | ( | trim | ( | ? | ) | )
   请问这个有办法避免吗?
   
   这个SQL是父工程里的SQL,不归我们项目组管辖,所以没办法改动SQL
   
   我们自己项目是没有这种SQL的,
   有没有办法配置 不包含 分表名 就 直接走默认逻辑
   比如我仅对user表进行分表
   那么“......from order where....”这种完全就不需要被解析,直接原样SQL访问数据库就好,不用改动SQL
   而我目前看到的是,不含 分表名 的SQL也被解析了,
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] terrymanu commented on issue #9275: Sharding JDBC4.0.1 SQL中出现类似lower(user_id) = lower(trim(?))时,解析会出错

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #9275:
URL: https://github.com/apache/shardingsphere/issues/9275#issuecomment-771566286


   **For English only**, other languages will not accept.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] terrymanu closed issue #9275: Sharding JDBC4.0.1 SQL中出现类似lower(user_id) = lower(trim(?))时,解析会出错

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #9275:
URL: https://github.com/apache/shardingsphere/issues/9275


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] terrymanu closed issue #9275: Sharding JDBC4.0.1 SQL中出现类似lower(user_id) = lower(trim(?))时,解析会出错

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #9275:
URL: https://github.com/apache/shardingsphere/issues/9275


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] terrymanu commented on issue #9275: Sharding JDBC4.0.1 SQL中出现类似lower(user_id) = lower(trim(?))时,解析会出错

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #9275:
URL: https://github.com/apache/shardingsphere/issues/9275#issuecomment-771566286


   **For English only**, other languages will not accept.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org