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/05/19 07:52:42 UTC

[GitHub] [shardingsphere] llooper-dev opened a new issue #10384: org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.ParameterMarkerExpressionSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.LiteralExpressionSegment

llooper-dev opened a new issue #10384:
URL: https://github.com/apache/shardingsphere/issues/10384


   aused by: org.apache.ibatis.exceptions.PersistenceException: 
   ### Error querying database.  Cause: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.ParameterMarkerExpressionSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.LiteralExpressionSegment
   ### The error may exist in com/inveno/rrlike/mapper/CommentUserMapper.java (best guess)
   ### The error may involve com.inveno.rrlike.mapper.CommentUserMapper.selectByUgcIdWithLessThanScore-Inline
   ### The error occurred while setting parameters
   ### SQL: SELECT *,? AS sortType,? AS loginUserId,5 AS childLimit FROM t_comment_user t  WHERE  t.is_delete=0 and t.ugc_id=? and t.root_id=0 and t.hot_score < ? and (t.comment_status = 1 or (t.comment_status = 2 and t.uid = ?)) and t.ugc_uid=?   ORDER BY t.hot_score DESC,t.id DESC   limit ?
   ### Cause: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.ParameterMarkerExpressionSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.LiteralExpressionSegment
           at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30) ~[mybatis-3.5.0.jar:3.5.0]
           at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:150) ~[mybatis-3.5.0.jar:3.5.0]
           at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141) ~[mybatis-3.5.0.jar:3.5.0]
           at sun.reflect.GeneratedMethodAccessor151.invoke(Unknown Source) ~[?:?]
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_252]
           at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_252]
           at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426) ~[mybatis-spring-2.0.3.jar:2.0.3]
           at com.sun.proxy.$Proxy152.selectList(Unknown Source) ~[?:?]
           at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:223) ~[mybatis-spring-2.0.3.jar:2.0.3]
           at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:144) ~[mybatis-3.5.0.jar:3.5.0]
           at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:77) ~[mybatis-3.5.0.jar:3.5.0]
           at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:58) ~[mybatis-3.5.0.jar:3.5.0]
           at com.sun.proxy.$Proxy157.selectByUgcIdWithLessThanScore(Unknown Source) ~[?:?]
           at com.inveno.rrlike.service.impl.CommentUgcService.queryCommentListBySortType(CommentUgcService.java:158) ~[rrlike-1.0.jar:1.0]
           at com.inveno.rrlike.service.impl.CommentUgcService.queryCommentList(CommentUgcService.java:104) ~[rrlike-1.0.jar:1.0]
           at com.inveno.rrlike.service.dubbo.provider.DubboLikeCommentService.buildCommentResponse(DubboLikeCommentService.java:177) ~[rrlike-1.0.jar:1.0]
           at com.inveno.rrlike.service.dubbo.provider.DubboLikeCommentService.lambda$queryLikeAndCommentBriefList$1(DubboLikeCommentService.java:80) ~[rrlike-1.0.jar:1.0]
           at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_252]
           at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_252]
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_252]
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_252]
           ... 1 more
   Caused by: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.ParameterMarkerExpressionSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.LiteralExpressionSegment
           at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.createProjection(MySQLDMLVisitor.java:472) ~[shardingsphere-sql-parser-mysql-4.1.1.jar:4.1.1]
           at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitProjection(MySQLDMLVisitor.java:434) ~[shardingsphere-sql-parser-mysql-4.1.1.jar:4.1.1]
           at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitProjection(MySQLDMLVisitor.java:127) ~[shardingsphere-sql-parser-mysql-4.1.1.jar:4.1.1]
           at org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$ProjectionContext.accept(MySQLStatementParser.java:5370) ~[shardingsphere-sql-parser-mysql-4.1.1.jar:4.1.1]
           at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18) ~[antlr4-runtime-4.7.2.jar:4.7.2]
           at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitProjections(MySQLDMLVisitor.java:410) ~[shardingsphere-sql-parser-mysql-4.1.1.jar:4.1.1]
           at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitProjections(MySQLDMLVisitor.java:127) ~[shardingsphere-sql-parser-mysql-4.1.1.jar:4.1.1]
           at org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$ProjectionsContext.accept(MySQLStatementParser.java:4865) ~[shardingsphere-sql-parser-mysql-4.1.1.jar:4.1.1]
           at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18) ~[antlr4-runtime-4.7.2.jar:4.7.2]
           at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitSelectClause(MySQLDMLVisitor.java:329) ~[shardingsphere-sql-parser-mysql-4.1.1.jar:4.1.1]
           at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitSelectClause(MySQLDMLVisitor.java:127) ~[shardingsphere-sql-parser-mysql-4.1.1.jar:4.1.1]
           at org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$SelectClauseContext.accept(MySQLStatementParser.java:4551) ~[shardingsphere-sql-parser-mysql-4.1.1.jar:4.1.1]
           at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18) ~[antlr4-runtime-4.7.2.jar:4.7.2]
           at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitUnionClause(MySQLDMLVisitor.java:322) ~[shardingsphere-sql-parser-mysql-4.1.1.jar:4.1.1]
           at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitUnionClause(MySQLDMLVisitor.java:127) ~[shardingsphere-sql-parser-mysql-4.1.1.jar:4.1.1]
           at org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$UnionClauseContext.accept(MySQLStatementParser.java:4446) ~[shardingsphere-sql-parser-mysql-4.1.1.jar:4.1.1]
           at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18) ~[antlr4-runtime-4.7.2.jar:4.7.2]
           at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitSelect(MySQLDMLVisitor.java:314) ~[shardingsphere-sql-parser-mysql-4.1.1.jar:4.1.1]
           at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitSelect(MySQLDMLVisitor.java:127) ~[shardingsphere-sql-parser-mysql-4.1.1.jar:4.1.1]
           at org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$SelectContext.accept(MySQLStatementParser.java:3098) ~[shardingsphere-sql-parser-mysql-4.1.1.jar:4.1.1]
           at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18) ~[antlr4-runtime-4.7.2.jar:4.7.2]
           at org.apache.shardingsphere.sql.parser.SQLParserEngine.parse0(SQLParserEngine.java:80) ~[shardingsphere-sql-parser-engine-4.1.1.jar:4.1.1]
           at org.apache.shardingsphere.sql.parser.SQLParserEngine.parse(SQLParserEngine.java:61) ~[shardingsphere-sql-parser-engine-4.1.1.jar:4.1.1]
           at org.apache.shardingsphere.underlying.route.DataNodeRouter.createRouteContext(DataNodeRouter.java:97) ~[shardingsphere-route-4.1.1.jar:4.1.1]
           at org.apache.shardingsphere.underlying.route.DataNodeRouter.executeRoute(DataNodeRouter.java:89) ~[shardingsphere-route-4.1.1.jar:4.1.1]
           at org.apache.shardingsphere.underlying.route.DataNodeRouter.route(DataNodeRouter.java:76) ~[shardingsphere-route-4.1.1.jar:4.1.1]
           at org.apache.shardingsphere.underlying.pluggble.prepare.PreparedQueryPrepareEngine.route(PreparedQueryPrepareEngine.java:54) ~[shardingsphere-pluggable-4.1.1.jar:4.1.1]
           at org.apache.shardingsphere.underlying.pluggble.prepare.BasePrepareEngine.executeRoute(BasePrepareEngine.java:96) ~[shardingsphere-pluggable-4.1.1.jar:4.1.1]
           at org.apache.shardingsphere.underlying.pluggble.prepare.BasePrepareEngine.prepare(BasePrepareEngine.java:83) ~[shardingsphere-pluggable-4.1.1.jar:4.1.1]
           at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.prepare(ShardingPreparedStatement.java:183) ~[sharding-jdbc-core-4.1.1.jar:4.1.1]
           at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.execute(ShardingPreparedStatement.java:143) ~[sharding-jdbc-core-4.1.1.jar:4.1.1]
           at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64) ~[mybatis-3.5.0.jar:3.5.0]
           at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79) ~[mybatis-3.5.0.jar:3.5.0]
           at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63) ~[mybatis-3.5.0.jar:3.5.0]
           at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324) ~[mybatis-3.5.0.jar:3.5.0]
           at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156) ~[mybatis-3.5.0.jar:3.5.0]
           at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109) ~[mybatis-3.5.0.jar:3.5.0]
           at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:83) ~[mybatis-3.5.0.jar:3.5.0]
           at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148) ~[mybatis-3.5.0.jar:3.5.0]
           at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141) ~[mybatis-3.5.0.jar:3.5.0]
           at sun.reflect.GeneratedMethodAccessor151.invoke(Unknown Source) ~[?:?]
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_252]
           at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_252]
           at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426) ~[mybatis-spring-2.0.3.jar:2.0.3]
           at com.sun.proxy.$Proxy152.selectList(Unknown Source) ~[?:?]
           at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:223) ~[mybatis-spring-2.0.3.jar:2.0.3]
           at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:144) ~[mybatis-3.5.0.jar:3.5.0]
           at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:77) ~[mybatis-3.5.0.jar:3.5.0]
           at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:58) ~[mybatis-3.5.0.jar:3.5.0]
           at com.sun.proxy.$Proxy157.selectByUgcIdWithLessThanScore(Unknown Source) ~[?:?]
           at com.inveno.rrlike.service.impl.CommentUgcService.queryCommentListBySortType(CommentUgcService.java:158) ~[rrlike-1.0.jar:1.0]
           at com.inveno.rrlike.service.impl.CommentUgcService.queryCommentList(CommentUgcService.java:104) ~[rrlike-1.0.jar:1.0]
           at com.inveno.rrlike.service.dubbo.provider.DubboLikeCommentService.buildCommentResponse(DubboLikeCommentService.java:177) ~[rrlike-1.0.jar:1.0]
           at com.inveno.rrlike.service.dubbo.provider.DubboLikeCommentService.lambda$queryLikeAndCommentBriefList$1(DubboLikeCommentService.java:80) ~[rrlike-1.0.jar:1.0]
           at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_252]
           at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_252]
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_252]
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_252]
           ... 1 more
   


-- 
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] strongduanmu commented on issue #10384: org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.ParameterMarkerExpressionSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.LiteralExpressionSegment

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


   > How should I write this title?
   
   @llooper-dev You can change it to `ParameterMarkerExpressionSegment cannot be cast to LiteralExpressionSegment exception is reported when execute select statement`.


-- 
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] strongduanmu closed issue #10384: ParameterMarkerExpressionSegment cannot be cast to LiteralExpressionSegment exception is reported when execute select statement.

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


   


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



[GitHub] [shardingsphere] llooper-dev commented on issue #10384: org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.ParameterMarkerExpressionSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.LiteralExpressionSegment

Posted by GitBox <gi...@apache.org>.
llooper-dev commented on issue #10384:
URL: https://github.com/apache/shardingsphere/issues/10384#issuecomment-843844040


   CREATE TABLE `t_comment_user` (
     `id` bigint NOT NULL COMMENT '主键id',
     `uid` bigint DEFAULT NULL COMMENT '当前操作用户id',
     `ugc_id` bigint DEFAULT NULL COMMENT '新鲜事id',
     `ugc_uid` bigint DEFAULT NULL COMMENT '发布新鲜事的作者id (散表字段)',
     `comment_type` int DEFAULT NULL COMMENT '评论类型:  image,text',
     `comment_text` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '评论的内容',
     `comment_status` int DEFAULT NULL COMMENT '评论状态,0:未审核,1:审核通过 2:未通过',
     `offreason` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '下架原因',
     `root_id` bigint DEFAULT NULL COMMENT '评论的根ID,保存第一级的评论ID',
     `parent_id` bigint DEFAULT '0' COMMENT '评论父id',
     `icon_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '头像icon(备用)',
     `nickname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '用户昵称(备用)',
     `is_author` int DEFAULT '0' COMMENT '是否为新鲜事作者 0:否,1:是',
     `manage_type` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '平台用户身份 如:组长,运营,管理员',
     `like_count` int DEFAULT '0' COMMENT '点赞数量,用于计算热度值',
     `comment_count` int DEFAULT '0' COMMENT '评论数量,用于计算热度值',
     `hot_score` double DEFAULT '0' COMMENT '热度分值',
     `is_delete` tinyint DEFAULT NULL COMMENT '是否逻辑删除 0:否,1:是',
     `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
     `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
     PRIMARY KEY (`id`) USING BTREE,
     UNIQUE KEY `uqidx_old_comment_id` (`old_comment_id`) USING BTREE,
     KEY `idx_root_id` (`root_id`) USING BTREE,
     KEY `idx_ugc_uid` (`ugc_uid`)
   ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='评论用户表,根据ugc_uid字段散库散表';


-- 
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] strongduanmu commented on issue #10384: org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.ParameterMarkerExpressionSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.LiteralExpressionSegment

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


   > 5.0.0-alpha, not released to the central repository, right? Can only check the source code and install it?
   
   @llooper-dev https://search.maven.org/artifact/org.apache.shardingsphere/shardingsphere/5.0.0-alpha/pom 


-- 
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] strongduanmu commented on issue #10384: org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.ParameterMarkerExpressionSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.LiteralExpressionSegment

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


   @llooper-dev Can you try the latest version —— `5.0.0-alpha`? The latest version has better support for SQL parsing.


-- 
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] llooper-dev commented on issue #10384: ParameterMarkerExpressionSegment cannot be cast to LiteralExpressionSegment exception is reported when execute select statement.

Posted by GitBox <gi...@apache.org>.
llooper-dev commented on issue #10384:
URL: https://github.com/apache/shardingsphere/issues/10384#issuecomment-843883383


          <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>sharding-jdbc-spring-boot-starter</artifactId>
               <version>?</version>
           </dependency>
          5.0.0-alpha with sharding-jdbc-spring-boot-starter which version?


-- 
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] llooper-dev commented on issue #10384: org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.ParameterMarkerExpressionSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.LiteralExpressionSegment

Posted by GitBox <gi...@apache.org>.
llooper-dev commented on issue #10384:
URL: https://github.com/apache/shardingsphere/issues/10384#issuecomment-843869002


   How should I write this title?


-- 
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] strongduanmu commented on issue #10384: org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.ParameterMarkerExpressionSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.LiteralExpressionSegment

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


   @llooper-dev Can you edit the title of the issue? Make it easier to search.


-- 
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] strongduanmu edited a comment on issue #10384: org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.ParameterMarkerExpressionSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.LiteralExpressionSegment

Posted by GitBox <gi...@apache.org>.
strongduanmu edited a comment on issue #10384:
URL: https://github.com/apache/shardingsphere/issues/10384#issuecomment-843854002


   @llooper-dev Can you try the latest version —— `5.0.0-alpha`? It has better support for SQL parsing.


-- 
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] llooper-dev commented on issue #10384: org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.ParameterMarkerExpressionSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.LiteralExpressionSegment

Posted by GitBox <gi...@apache.org>.
llooper-dev commented on issue #10384:
URL: https://github.com/apache/shardingsphere/issues/10384#issuecomment-843843237


   SELECT *,? AS sortType,? AS loginUserId,5 AS childLimit FROM t_comment_user t  WHERE  t.is_delete=0 and t.ugc_id=? and t.root_id=0 and t.hot_score < ? and (t.comment_status = 1 or (t.comment_status = 2 and t.uid = ?)) and t.ugc_uid=?   ORDER BY t.hot_score DESC,t.id DESC   limit ?


-- 
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] llooper-dev commented on issue #10384: org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.ParameterMarkerExpressionSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.LiteralExpressionSegment

Posted by GitBox <gi...@apache.org>.
llooper-dev commented on issue #10384:
URL: https://github.com/apache/shardingsphere/issues/10384#issuecomment-843857848


   OK, I'll try it on ,thk!


-- 
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] llooper-dev commented on issue #10384: ParameterMarkerExpressionSegment cannot be cast to LiteralExpressionSegment exception is reported when execute select statement.

Posted by GitBox <gi...@apache.org>.
llooper-dev commented on issue #10384:
URL: https://github.com/apache/shardingsphere/issues/10384#issuecomment-844175878


   thk!


-- 
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] tuichenchuxin commented on issue #10384: ParameterMarkerExpressionSegment cannot be cast to LiteralExpressionSegment exception is reported when execute select statement.

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


   @strongduanmu I have tried this sql on master branch, it is supported now.


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



[GitHub] [shardingsphere] strongduanmu commented on issue #10384: ParameterMarkerExpressionSegment cannot be cast to LiteralExpressionSegment exception is reported when execute select statement.

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


   This sql has been supported in the master branch, you can try it.
   
   


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



[GitHub] [shardingsphere] llooper-dev commented on issue #10384: org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.ParameterMarkerExpressionSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.simple.LiteralExpressionSegment

Posted by GitBox <gi...@apache.org>.
llooper-dev commented on issue #10384:
URL: https://github.com/apache/shardingsphere/issues/10384#issuecomment-843871621


   5.0.0-alpha, not released to the central repository, right? Can only check the source code and install it?


-- 
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] strongduanmu commented on issue #10384: ParameterMarkerExpressionSegment cannot be cast to LiteralExpressionSegment exception is reported when execute select statement.

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


   @llooper-dev Starting from 5.0, maven pom has changed to start with `shardingsphere`.
   
   ```xml
   <dependency>
     <groupId>org.apache.shardingsphere</groupId>
     <artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
     <version>5.0.0-alpha</version>
   </dependency>
   ```


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