strongduanmu opened a new issue #12554:
URL: https://github.com/apache/shardingsphere/issues/12554


   ### Which version of ShardingSphere did you use?
   
   master branch
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   jdbc or proxy
   
   ### Expected behavior
   
   return result without exception
   
   ### Actual behavior
   
   ```
   java.lang.IllegalArgumentException: null
        at 
com.google.common.base.Preconditions.checkArgument(Preconditions.java:128)
        at 
org.apache.shardingsphere.infra.merge.result.impl.memory.MemoryQueryResultRow.getCell(MemoryQueryResultRow.java:54)
        at 
org.apache.shardingsphere.infra.merge.result.impl.memory.MemoryMergedResult.getValue(MemoryMergedResult.java:74)
        at 
org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.getQueryResponseRow(DatabaseCommunicationEngine.java:210)
        at 
org.apache.shardingsphere.proxy.backend.text.data.impl.SchemaAssignedDatabaseBackendHandler.getRowData(SchemaAssignedDatabaseBackendHandler.java:65)
        at 
org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.getQueryRowPacket(MySQLComQueryPacketExecutor.java:80)
        at 
org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.getQueryRowPacket(MySQLComQueryPacketExecutor.java:42)
        at 
org.apache.shardingsphere.proxy.frontend.mysql.command.MySQLCommandExecuteEngine.writeQueryData(MySQLCommandExecuteEngine.java:88)
        at 
org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:105)
        at 
org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:72)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:748)
   ```
   
   Following is the sharding config:
   ```yaml
   rules:
   - !SHARDING
     tables:
       t_order:
         actualDataNodes: ds_0.t_order_${0..1}
         tableStrategy:
           standard:
             shardingColumn: order_id
             shardingAlgorithmName: t_order_inline
         keyGenerateStrategy:
           column: order_id
           keyGeneratorName: snowflake
       t_order_item:
         actualDataNodes: ds_${0..1}.t_order_item_${0..1}
         tableStrategy:
           standard:
             shardingColumn: order_id
             shardingAlgorithmName: t_order_item_inline
         keyGenerateStrategy:
           column: order_item_id
           keyGeneratorName: snowflake
     bindingTables:
       - t_order,t_order_item
     defaultDatabaseStrategy:
       standard:
         shardingColumn: user_id
         shardingAlgorithmName: database_inline
     defaultTableStrategy:
       none:
   
     shardingAlgorithms:
       database_inline:
         type: INLINE
         props:
           algorithm-expression: ds_${user_id % 2}
       t_order_inline:
         type: INLINE
         props:
           algorithm-expression: t_order_${order_id % 2}
       t_order_item_inline:
         type: INLINE
         props:
           algorithm-expression: t_order_item_${order_id % 2}
   
     keyGenerators:
       snowflake:
         type: SNOWFLAKE
         props:
           worker-id: 123
   ```
   
   Table `t_single` and `t_order` are in the same datasource, and when i 
execute this sql(no result return actually), exception will be thrown.
   
   ```sql
   select distinct s.* from t_single s inner join t_order o on s.single_id = 
o.user_id order by s.content;
   ```
   
   ### Reason analyze (If you can)
   
   
   


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