liangliang1006 opened a new issue #16189:
URL: https://github.com/apache/shardingsphere/issues/16189


   I tried to use the postgrelsql11.8 version of the database to expand my 
data, but it didn't work;
   At first, I used sharding-proxy4.1.0 and sharding-scaling4.1.0 to try to 
expand a table;
   My main configuration is like this:
   schemaName: order
   #
   dataSources:
     ds_0:
       url: jdbc:postgresql://127.0.0.1:5432/testdb
       username: gpadmin
       password: gpadmin
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
   # ds_1:
   # url: jdbc:postgresql://127.0.0.1:5432/demo_ds_1
   # username: postgres
   # password: postgres
   # connectionTimeoutMilliseconds: 30000
   # idleTimeoutMilliseconds: 60000
   # maxLifetimeMilliseconds: 1800000
   # maxPoolSize: 50
   # minPoolSize: 1
   #
   rules:
   - !SHARDING
     tables:
       t_order:
         actualDataNodes: ds_0.t_order_${0..1}
         tableStrategy:
           standard:
             shardingColumn: order_id
             shardingAlgorithmName: t_order_${order_id % 2}
         keyGenerateStrategy:
             column: order_id
             keyGeneratorName: snowflake
   -------------------------------------------------- 
-----------------------------------------
   {
      "ruleConfiguration": {
         "sourceDatasource": "ds_0: 
!!org.apache.shardingsphere.orchestration.core.configuration.YamlDataSourceConfiguration\n
 dataSourceClassName: com.zaxxer.hikari.HikariDataSource\n properties:\n 
jdbcUrl: jdbc:postgresql://127.0.0.1 
:5432/exampledb?serverTimezone=UTC&useSSL=false&zeroDateTimeBehavior=convertToNull\n
 driverClassName: org.postgresql.Driver\n username: postgres\n password: 
postgres\n connectionTimeout: 30000\n idleTimeout: 60000\n maxLifetime: 
1800000\n maxPoolSize: 100\n minPoolSize: 10\n maintenanceIntervalMilliseconds: 
30000\n readOnly: false\n",
         "sourceRule": "tables:\n t_order:\n actualDataNodes: ds_0.t_order\n 
keyGenerator:\n column: order_id\n type: SNOWFLAKE",
         "destinationDataSources": {
            "name": "dt_1",
            "password": "root",
            "url": 
"jdbc:postgresql://127.0.0.1:3307/order?serverTimezone=UTC&useSSL=false",
            "username": "root"
         }
      },
      "jobConfiguration": {
         "concurrency": 1
      }
   }
   -------------------------------------------------- -
   The log shows:
   [ERROR] 15:18:01.012 [pool-6-thread-1] o.a.s.s.f.c.CommandExecutorTask - 
Exception occur:
   java.lang.NullPointerException: null
           at 
org.apache.shardingsphere.database.protocol.postgresql.packet.command.query.binary.bind.PostgreSQLComBindPacket.<init>(PostgreSQLComBindPacket.java:59)
           at 
org.apache.shardingsphere.database.protocol.postgresql.packet.command.PostgreSQLCommandPacketFactory.newInstance(PostgreSQLCommandPacketFactory.java:57)
           at 
org.apache.shardingsphere.shardingproxy.frontend.postgresql.command.PostgreSQLCommandExecuteEngine.getCommandPacket(PostgreSQLCommandExecuteEngine.java:55)
           at 
org.apache.shardingsphere.shardingproxy.frontend.postgresql.command.PostgreSQLCommandExecuteEngine.getCommandPacket(PostgreSQLCommandExecuteEngine.java:46)
           at 
org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:91)
           at 
org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:71)
           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)
   After that, I tried to upgrade sharding-scaling to 4.1.1, and upgraded 
sharding-proxy to the latest 5.1.0, but it still reported an error:
   [ERROR] 2022-03-18 16:37:06.365 [Connection-2-ThreadExecutor] 
o.a.s.p.f.c.CommandExecutorTask - Exception occur:
   com.google.common.util.concurrent.UncheckedExecutionException: 
org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an 
error in your SQL syntax
           at 
com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2051)
           at com.google.common.cache.LocalCache.get(LocalCache.java:3951)
           at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974)
           at 
com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4935)
           at 
com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4941)
           at 
org.apache.shardingsphere.infra.parser.sql.SQLStatementParserEngine.parse(SQLStatementParserEngine.java:47)
           at 
org.apache.shardingsphere.infra.parser.ShardingSphereSQLParserEngine.parse0(ShardingSphereSQLParserEngine.java:70)
           at 
org.apache.shardingsphere.infra.parser.ShardingSphereSQLParserEngine.parse(ShardingSphereSQLParserEngine.java:59)
           at 
org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.parse.PostgreSQLComParseExecutor.parseSql(PostgreSQLComParseExecutor.java:67)
           at 
org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.parse.PostgreSQLComParseExecutor.execute(PostgreSQLComParseExecutor.java:53)
           at 
org.apache.shardingsphere.proxy.frontend.postgresql.command.query.ext


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