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

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   
   master - fbdc8d18547e367eb72c35e4533a77628777c198
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ShardingSphere-Proxy PostgreSQL
   
   ### Expected behavior
   
   Query worked.
   
   ### Actual behavior
   
   ```
   Exception in thread "main" org.postgresql.util.PSQLException: ERROR: 
Character : is neither a decimal digit number, decimal point, nor "e" notation 
exponential mark.
        at 
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2675)
        at 
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2365)
        at 
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:355)
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:490)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:408)
        at 
org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:166)
        at 
org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:118)
   ```
   
   ```
   [ERROR] 2023-01-10 16:48:48.343 [Connection-3-ThreadExecutor] 
o.a.s.p.f.c.CommandExecutorTask - Exception occur: 
   java.lang.NumberFormatException: Character : is neither a decimal digit 
number, decimal point, nor "e" notation exponential mark.
        at java.base/java.math.BigDecimal.<init>(BigDecimal.java:582)
        at java.base/java.math.BigDecimal.<init>(BigDecimal.java:467)
        at java.base/java.math.BigDecimal.<init>(BigDecimal.java:896)
        at 
org.apache.shardingsphere.sql.parser.sql.common.value.literal.impl.NumberLiteralValue.getNumber(NumberLiteralValue.java:43)
        at 
org.apache.shardingsphere.sql.parser.sql.common.value.literal.impl.NumberLiteralValue.<init>(NumberLiteralValue.java:35)
        at 
org.apache.shardingsphere.sql.parser.postgresql.visitor.statement.impl.PostgreSQLStatementSQLVisitor.visitNumberLiterals(PostgreSQLStatementSQLVisitor.java:229)
        at 
org.apache.shardingsphere.sql.parser.postgresql.visitor.statement.impl.PostgreSQLStatementSQLVisitor.visitNumberLiterals(PostgreSQLStatementSQLVisitor.java:204)
        at 
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser$NumberLiteralsContext.accept(PostgreSQLStatementParser.java:13216)
        at 
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
        at 
org.apache.shardingsphere.sql.parser.postgresql.visitor.statement.impl.PostgreSQLStatementSQLVisitor.visitParameterMarker(PostgreSQLStatementSQLVisitor.java:220)
        at 
org.apache.shardingsphere.sql.parser.postgresql.visitor.statement.impl.PostgreSQLStatementSQLVisitor.visitParameterMarker(PostgreSQLStatementSQLVisitor.java:204)
        at 
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser$ParameterMarkerContext.accept(PostgreSQLStatementParser.java:13032)
        at 
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
        at 
org.apache.shardingsphere.sql.parser.postgresql.visitor.statement.impl.PostgreSQLStatementSQLVisitor.visitCExpr(PostgreSQLStatementSQLVisitor.java:396)
        at 
org.apache.shardingsphere.sql.parser.postgresql.visitor.statement.impl.PostgreSQLStatementSQLVisitor.visitCExpr(PostgreSQLStatementSQLVisitor.java:204)
        at 
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser$CExprContext.accept(PostgreSQLStatementParser.java:16524)
        at 
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
        at 
org.apache.shardingsphere.sql.parser.postgresql.visitor.statement.impl.PostgreSQLStatementSQLVisitor.visitAExpr(PostgreSQLStatementSQLVisitor.java:300)
        at 
org.apache.shardingsphere.sql.parser.postgresql.visitor.statement.impl.PostgreSQLStatementSQLVisitor.visitAExpr(PostgreSQLStatementSQLVisitor.java:204)
        at 
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser$AExprContext.accept(PostgreSQLStatementParser.java:15446)
        at 
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
        at 
org.apache.shardingsphere.sql.parser.postgresql.visitor.statement.impl.PostgreSQLStatementSQLVisitor.createProjectionSegment(PostgreSQLStatementSQLVisitor.java:1055)
        at 
org.apache.shardingsphere.sql.parser.postgresql.visitor.statement.impl.PostgreSQLStatementSQLVisitor.visitTargetEl(PostgreSQLStatementSQLVisitor.java:1038)
        at 
org.apache.shardingsphere.sql.parser.postgresql.visitor.statement.impl.PostgreSQLStatementSQLVisitor.visitTargetEl(PostgreSQLStatementSQLVisitor.java:204)
        at 
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser$TargetElContext.accept(PostgreSQLStatementParser.java:8022)
        at 
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
        at 
org.apache.shardingsphere.sql.parser.postgresql.visitor.statement.impl.PostgreSQLStatementSQLVisitor.visitTargetList(PostgreSQLStatementSQLVisitor.java:1031)
        at 
org.apache.shardingsphere.sql.parser.postgresql.visitor.statement.impl.PostgreSQLStatementSQLVisitor.visitTargetList(PostgreSQLStatementSQLVisitor.java:204)
        at 
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser$TargetListContext.accept(PostgreSQLStatementParser.java:7941)
        at 
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
        at 
org.apache.shardingsphere.sql.parser.postgresql.visitor.statement.impl.PostgreSQLStatementSQLVisitor.visitSimpleSelect(PostgreSQLStatementSQLVisitor.java:962)
        at 
org.apache.shardingsphere.sql.parser.postgresql.visitor.statement.impl.PostgreSQLStatementSQLVisitor.visitSimpleSelect(PostgreSQLStatementSQLVisitor.java:204)
        at 
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser$SimpleSelectContext.accept(PostgreSQLStatementParser.java:5674)
        at 
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
        at 
org.apache.shardingsphere.sql.parser.postgresql.visitor.statement.impl.PostgreSQLStatementSQLVisitor.visitSelectClauseN(PostgreSQLStatementSQLVisitor.java:930)
        at 
org.apache.shardingsphere.sql.parser.postgresql.visitor.statement.impl.PostgreSQLStatementSQLVisitor.visitSelectClauseN(PostgreSQLStatementSQLVisitor.java:204)
        at 
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser$SelectClauseNContext.accept(PostgreSQLStatementParser.java:5509)
        at 
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
        at 
org.apache.shardingsphere.sql.parser.postgresql.visitor.statement.impl.PostgreSQLStatementSQLVisitor.visitSelectNoParens(PostgreSQLStatementSQLVisitor.java:898)
        at 
org.apache.shardingsphere.sql.parser.postgresql.visitor.statement.impl.PostgreSQLStatementSQLVisitor.visitSelectNoParens(PostgreSQLStatementSQLVisitor.java:204)
        at 
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser$SelectNoParensContext.accept(PostgreSQLStatementParser.java:5302)
        at 
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
        at 
org.apache.shardingsphere.sql.parser.postgresql.visitor.statement.impl.PostgreSQLStatementSQLVisitor.visitSelect(PostgreSQLStatementSQLVisitor.java:890)
        at 
org.apache.shardingsphere.sql.parser.postgresql.visitor.statement.impl.PostgreSQLStatementSQLVisitor.visitSelect(PostgreSQLStatementSQLVisitor.java:204)
        at 
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser$SelectContext.accept(PostgreSQLStatementParser.java:5179)
        at 
org.apache.shardingsphere.sql.parser.api.SQLVisitorEngine.visit(SQLVisitorEngine.java:54)
        at 
org.apache.shardingsphere.infra.parser.sql.SQLStatementParserExecutor.parse(SQLStatementParserExecutor.java:48)
        at 
org.apache.shardingsphere.infra.parser.cache.SQLStatementCacheLoader.load(SQLStatementCacheLoader.java:41)
        at 
org.apache.shardingsphere.infra.parser.cache.SQLStatementCacheLoader.load(SQLStatementCacheLoader.java:30)
        at 
com.github.benmanes.caffeine.cache.LocalLoadingCache.lambda$newMappingFunction$2(LocalLoadingCache.java:145)
        at 
com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$doComputeIfAbsent$14(BoundedLocalCache.java:2406)
        at 
java.base/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1916)
        at 
com.github.benmanes.caffeine.cache.BoundedLocalCache.doComputeIfAbsent(BoundedLocalCache.java:2404)
        at 
com.github.benmanes.caffeine.cache.BoundedLocalCache.computeIfAbsent(BoundedLocalCache.java:2387)
        at 
com.github.benmanes.caffeine.cache.LocalCache.computeIfAbsent(LocalCache.java:108)
        at 
com.github.benmanes.caffeine.cache.LocalLoadingCache.get(LocalLoadingCache.java:56)
        at 
org.apache.shardingsphere.infra.parser.sql.SQLStatementParserEngine.parse(SQLStatementParserEngine.java:47)
        at 
org.apache.shardingsphere.infra.parser.ShardingSphereSQLParserEngine.parse(ShardingSphereSQLParserEngine.java:58)
        at 
org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.parse.PostgreSQLComParseExecutor.execute(PostgreSQLComParseExecutor.java:63)
        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.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)
   ```
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   
   ### Example codes for reproduce this issue (such as a github link).
   
   ```java
   try (PreparedStatement preparedStatement = 
connection.prepareStatement("select ?::money")) {
       preparedStatement.setObject(1, "-92233720368547758.08");
       try (ResultSet resultSet = preparedStatement.executeQuery()) {
           resultSet.next();
           System.out.println(resultSet.getString(1));
       }
   }
   ```
   


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