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

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   
   5.3.2
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   Proxy
   
   ### Expected behavior
   
   https://dev.mysql.com/doc/refman/8.0/en/values.html
   
   VALUES statement worked.
   
   ### Actual behavior
   
   ```
   mysql> values ROW(1,2);
   ERROR 30000 (HY000): Unknown exception: class 
org.apache.shardingsphere.sql.parser.sql.common.segment.dml.assignment.InsertValuesSegment
 cannot be cast to class 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dml.MySQLSelectStatement
 
(org.apache.shardingsphere.sql.parser.sql.common.segment.dml.assignment.InsertValuesSegment
 and 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dml.MySQLSelectStatement
 are in unnamed module of loader 'app')
   ```
   
   ```
   [ERROR] 2023-05-25 14:01:53.286 [ShardingSphere-Command-2] 
o.a.s.p.f.c.CommandExecutorTask - Exception occur: 
   java.lang.ClassCastException: class 
org.apache.shardingsphere.sql.parser.sql.common.segment.dml.assignment.InsertValuesSegment
 cannot be cast to class 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dml.MySQLSelectStatement
 
(org.apache.shardingsphere.sql.parser.sql.common.segment.dml.assignment.InsertValuesSegment
 and 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dml.MySQLSelectStatement
 are in unnamed module of loader 'app')
        at 
org.apache.shardingsphere.sql.parser.mysql.visitor.statement.MySQLStatementVisitor.visitQueryExpression(MySQLStatementVisitor.java:680)
        at 
org.apache.shardingsphere.sql.parser.mysql.visitor.statement.MySQLStatementVisitor.visitQueryExpression(MySQLStatementVisitor.java:235)
        at 
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$QueryExpressionContext.accept(MySQLStatementParser.java:21280)
        at 
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
        at 
org.apache.shardingsphere.sql.parser.mysql.visitor.statement.MySQLStatementVisitor.visitSelect(MySQLStatementVisitor.java:1480)
        at 
org.apache.shardingsphere.sql.parser.mysql.visitor.statement.MySQLStatementVisitor.visitSelect(MySQLStatementVisitor.java:235)
        at 
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$SelectContext.accept(MySQLStatementParser.java:21113)
        at 
org.apache.shardingsphere.sql.parser.api.SQLStatementVisitorEngine.visit(SQLStatementVisitorEngine.java:48)
        at 
org.apache.shardingsphere.infra.parser.sql.SQLStatementParserExecutor.parse(SQLStatementParserExecutor.java:46)
        at 
org.apache.shardingsphere.infra.parser.sql.SQLStatementParserEngine.parse(SQLStatementParserEngine.java:47)
        at 
org.apache.shardingsphere.infra.parser.ShardingSphereSQLParserEngine.parse(ShardingSphereSQLParserEngine.java:52)
        at 
org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.parseSQL(MySQLComQueryPacketExecutor.java:79)
        at 
org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.<init>(MySQLComQueryPacketExecutor.java:67)
        at 
org.apache.shardingsphere.proxy.frontend.mysql.command.MySQLCommandExecutorFactory.newInstance(MySQLCommandExecutorFactory.java:78)
        at 
org.apache.shardingsphere.proxy.frontend.mysql.command.MySQLCommandExecuteEngine.getCommandExecutor(MySQLCommandExecuteEngine.java:64)
        at 
org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:109)
        at 
org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:77)
        at com.alibaba.ttl.TtlRunnable.run(TtlRunnable.java:60)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:833)
   ```
   


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