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

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   
   Related to #23580.
   
   ### Expected behavior
   
   No error occurred.
   
   ### Actual behavior
   
   ```
   [ERROR] 2023-01-17 19:11:55.294 [Connection-2-ThreadExecutor] 
o.a.s.p.f.c.CommandExecutorTask - Exception occur: 
   java.lang.ClassCastException: 
org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.TypeCastExpression
 cannot be cast to 
org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.complex.ComplexExpressionSegment
        at 
org.apache.shardingsphere.infra.rewrite.sql.token.pojo.generic.InsertValue.getValue(InsertValue.java:63)
        at 
org.apache.shardingsphere.infra.rewrite.sql.token.pojo.generic.InsertValue.toString(InsertValue.java:45)
        at java.lang.String.valueOf(String.java:2994)
        at java.lang.StringBuilder.append(StringBuilder.java:136)
        at 
org.apache.shardingsphere.sharding.rewrite.token.pojo.ShardingInsertValuesToken.appendInsertValue(ShardingInsertValuesToken.java:51)
        at 
org.apache.shardingsphere.sharding.rewrite.token.pojo.ShardingInsertValuesToken.toString(ShardingInsertValuesToken.java:38)
        at 
org.apache.shardingsphere.infra.rewrite.sql.impl.RouteSQLBuilder.getSQLTokenText(RouteSQLBuilder.java:40)
        at 
org.apache.shardingsphere.infra.rewrite.sql.impl.AbstractSQLBuilder.toSQL(AbstractSQLBuilder.java:55)
        at 
org.apache.shardingsphere.infra.rewrite.engine.RouteSQLRewriteEngine.addSQLRewriteUnits(RouteSQLRewriteEngine.java:96)
        at 
org.apache.shardingsphere.infra.rewrite.engine.RouteSQLRewriteEngine.rewrite(RouteSQLRewriteEngine.java:72)
        at 
org.apache.shardingsphere.infra.rewrite.SQLRewriteEntry.rewrite(SQLRewriteEntry.java:79)
        at 
org.apache.shardingsphere.infra.context.kernel.KernelProcessor.rewrite(KernelProcessor.java:65)
        at 
org.apache.shardingsphere.infra.context.kernel.KernelProcessor.generateExecutionContext(KernelProcessor.java:52)
        at 
org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.PostgreSQLBatchedStatementsExecutor.createExecutionContext(PostgreSQLBatchedStatementsExecutor.java:131)
        at 
org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.PostgreSQLBatchedStatementsExecutor.<init>(PostgreSQLBatchedStatementsExecutor.java:96)
        at 
org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.PostgreSQLAggregatedBatchedStatementsCommandExecutor.execute(PostgreSQLAggregatedBatchedStatementsCommandExecutor.java:53)
        at 
org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.PostgreSQLAggregatedCommandExecutor.execute(PostgreSQLAggregatedCommandExecutor.java:41)
        at 
org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:110)
        at 
org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:77)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
   ```
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   
   ```SQL
   INSERT INTO 
test.t_order(order_id,user_id,status,t_int2,t_numeric,t_bool,t_char,t_varchar,t_float,t_double,t_json,t_text,t_date,t_timestmap,t_timestamptz)
 VALUES (?,?,?,?,?,?,?,?,?,?,?::json,?,?,?,?)
   ```
   
   


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