motume opened a new issue, #30720: URL: https://github.com/apache/shardingsphere/issues/30720
ssproxy-5.3.3(apache-shardingsphere-5.3.3-SNAPSHOT-shardingsphere-proxy-bin.tar.gz), tbase(version:PostgreSQL 10.0 TBase V2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit). We use the TBase database, and we use shardingSphere-proxy as database middleware. After the proxy is successfully deployed, add encrypt rules for table ,try to insert record to table from proxy. but ERROR: org.apache.shardingsphere.sql.parser.sql.common.segment.dml.column.ColumnSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.complex.ComplexExpressionSegment log is below: [ERROR] 2024-04-01 09:47:48.844 [ShardingSphere-Command-2] o.a.s.p.f.c.CommandExecutorTask - Exception occur: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.common.segment.dml.column.ColumnSegment 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:131) at org.apache.shardingsphere.encrypt.rewrite.token.pojo.EncryptInsertValuesToken.toString(EncryptInsertValuesToken.java:36) at org.apache.shardingsphere.infra.rewrite.sql.impl.RouteSQLBuilder.getSQLTokenText(RouteSQLBuilder.java:42) 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:80) at org.apache.shardingsphere.infra.context.kernel.KernelProcessor.rewrite(KernelProcessor.java:66) at org.apache.shardingsphere.infra.context.kernel.KernelProcessor.generateExecutionContext(KernelProcessor.java:52) at org.apache.shardingsphere.proxy.backend.connector.DatabaseConnector.generateExecutionContexts(DatabaseConnector.java:215) at org.apache.shardingsphere.proxy.backend.connector.DatabaseConnector.execute(DatabaseConnector.java:208) at org.apache.shardingsphere.proxy.frontend.postgresql.command.query.simple.PostgreSQLComQueryExecutor.execute(PostgreSQLComQueryExecutor.java:77) at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.doExecuteCommand(CommandExecutorTask.java:116) at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:111) at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:78) at com.alibaba.ttl.TtlRunnable.run(TtlRunnable.java:60) 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:748) -------------------------------------------- create table t_user(id int,name varchar(15), phone varchar(15),c_name varchar(45),c_phone varchar(45),age int,c_age int,primary key(id)); ENCRYPT RULE: CREATE ENCRYPT RULE t_user (COLUMNS((NAME=phone,CIPHER=c_phone,ENCRYPT_ALGORITHM(TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc')))))); -- 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-unsubscr...@shardingsphere.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org