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 2020/03/13 03:08:31 UTC
[GitHub] [incubator-shardingsphere] phoema opened a new issue #4740:
SubQuery Caused by
java.lang.ClassCastException:org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.subquery.SubquerySegment
cannot be cast to
org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment
phoema opened a new issue #4740: SubQuery Caused by java.lang.ClassCastException:org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.subquery.SubquerySegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment
URL: https://github.com/apache/incubator-shardingsphere/issues/4740
DB:Mysql
Version :5.0.0-RC1-SNAPSHOT
SQL:
select RES.*
from ACT_RE_PROCDEF RES
WHERE RES.VERSION_ = (select max(VERSION_) from ACT_RE_PROCDEF where KEY_ = RES.KEY_
and ( (TENANT_ID_ IS NOT NULL and TENANT_ID_ = RES.TENANT_ID_) or (TENANT_ID_ IS NULL and RES.TENANT_ID_ IS NULL) )
)
order by RES.CATEGORY_ asc
Caused by: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.subquery.SubquerySegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment
at org.apache.shardingsphere.sql.parser.visitor.MySQLVisitor.createPredicateRightValue(MySQLVisitor.java:291)
at org.apache.shardingsphere.sql.parser.visitor.MySQLVisitor.createCompareSegment(MySQLVisitor.java:281)
at org.apache.shardingsphere.sql.parser.visitor.MySQLVisitor.visitBooleanPrimary(MySQLVisitor.java:267)
at org.apache.shardingsphere.sql.parser.visitor.MySQLVisitor.visitBooleanPrimary(MySQLVisitor.java:115)
at org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$BooleanPrimaryContext.accept(MySQLStatementParser.java:11471)
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
at org.apache.shardingsphere.sql.parser.visitor.MySQLVisitor.visitExpr(MySQLVisitor.java:252)
at org.apache.shardingsphere.sql.parser.visitor.MySQLVisitor.visitExpr(MySQLVisitor.java:115)
at org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$ExprContext.accept(MySQLStatementParser.java:11249)
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
at org.apache.shardingsphere.sql.parser.visitor.impl.MySQLDMLVisitor.visitWhereClause(MySQLDMLVisitor.java:555)
at org.apache.shardingsphere.sql.parser.visitor.impl.MySQLDMLVisitor.visitWhereClause(MySQLDMLVisitor.java:119)
at org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$WhereClauseContext.accept(MySQLStatementParser.java:6969)
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
at org.apache.shardingsphere.sql.parser.visitor.impl.MySQLDMLVisitor.visitSelectClause(MySQLDMLVisitor.java:318)
at org.apache.shardingsphere.sql.parser.visitor.impl.MySQLDMLVisitor.visitSelectClause(MySQLDMLVisitor.java:119)
at org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$SelectClauseContext.accept(MySQLStatementParser.java:4542)
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
at org.apache.shardingsphere.sql.parser.visitor.impl.MySQLDMLVisitor.visitUnionClause(MySQLDMLVisitor.java:303)
at org.apache.shardingsphere.sql.parser.visitor.impl.MySQLDMLVisitor.visitUnionClause(MySQLDMLVisitor.java:119)
at org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$UnionClauseContext.accept(MySQLStatementParser.java:4437)
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
at org.apache.shardingsphere.sql.parser.visitor.impl.MySQLDMLVisitor.visitSelect(MySQLDMLVisitor.java:295)
at org.apache.shardingsphere.sql.parser.visitor.impl.MySQLDMLVisitor.visitSelect(MySQLDMLVisitor.java:119)
at org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$SelectContext.accept(MySQLStatementParser.java:3095)
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
at org.apache.shardingsphere.sql.parser.SQLParserEngine.parse0(SQLParserEngine.java:72)
at org.apache.shardingsphere.sql.parser.SQLParserEngine.parse(SQLParserEngine.java:53)
at org.apache.shardingsphere.sharding.route.engine.ShardingRouter.parse(ShardingRouter.java:100)
at org.apache.shardingsphere.sharding.route.engine.ShardingRouter.route(ShardingRouter.java:73)
at org.apache.shardingsphere.core.shard.PreparedQueryShardingEngine.route(PreparedQueryShardingEngine.java:52)
at org.apache.shardingsphere.core.shard.BaseShardingEngine.executeRoute(BaseShardingEngine.java:106)
at org.apache.shardingsphere.core.shard.BaseShardingEngine.shard(BaseShardingEngine.java:88)
at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.shard(ShardingPreparedStatement.java:242)
at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.execute(ShardingPreparedStatement.java:182)
at sun.reflect.GeneratedMethodAccessor239.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.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59)
at com.sun.proxy.$Proxy152.execute(Unknown Source)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:83)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] phoema commented on issue #4740:
SubQuery Caused by
java.lang.ClassCastException:org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.subquery.SubquerySegment
cannot be cast to
org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment
Posted by GitBox <gi...@apache.org>.
phoema commented on issue #4740: SubQuery Caused by java.lang.ClassCastException:org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.subquery.SubquerySegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment
URL: https://github.com/apache/incubator-shardingsphere/issues/4740#issuecomment-598528186
0ce016e13fd5ba42b5f6beba595d68e955f8dc1e [0ce016e]
93b55f9fdc
Liang Zhang <te...@163.com>
2020-3-5 23:09:59
maybe update new source code
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] phoema closed issue #4740: SubQuery
Caused by
java.lang.ClassCastException:org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.subquery.SubquerySegment
cannot be cast to
org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment
Posted by GitBox <gi...@apache.org>.
phoema closed issue #4740: SubQuery Caused by java.lang.ClassCastException:org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.subquery.SubquerySegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment
URL: https://github.com/apache/incubator-shardingsphere/issues/4740
----------------------------------------------------------------
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
With regards,
Apache Git Services