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

   ### Which version of ShardingSphere did you use?
   we find java version: java8, full_version=1.8.0_282, 
full_path=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.282.b08-1.el7_9.x86_64/bin/java
   ShardingSphere-5.2.1-SNAPSHOT
   Commit ID: dirty-20bf595dfeced4dd8ffee2f6d95de52fdf3e569d
   Commit Message: Rename sub modules of shardingsphere-infra-datetime-type. 
(#21472)
   Branch: 20bf595dfeced4dd8ffee2f6d95de52fdf3e569d
   Build time: 2022-11-11T19:57:07+0800
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   
   ### Expected behavior
   The result of select syntax group by non-shard key (column exists null 
value)is incorrect
   
   ### Actual behavior
   The result of select syntax group by non-shard key (column exists null 
value)is correct
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   1、server.yaml 
   props:
     sql-show: true
     sql-federation-type: ADVANCED
   2、gsql connect
   ```
   drop table if exists t_ssdb_tb;
   create table t_ssdb_tb(id int,c_id int,a int,b char(10));
   insert into t_ssdb_tb values 
(1,1,10,'test11'),(1,2,10,'Test12'),(1,2,null,'test12'),
   (2,1,20,'test21'),(2,2,20,'test22'),(2,3,null,'Test22'),
   (3,3,null,'test3'),(3,3,null,'test3'),(4,4,40,'test4'),(5,5,50,'Test5');
   select avg(id),a from t_ssdb_tb group by a; 
   ```
   
   **ss-proxy result**
   ```
   test_db=> select avg(id),a from t_ssdb_tb group by a;
     avg   | a
   --------+----
    1.0000 | 10
    1.0000 |
    1.0000 | 10
    2.0000 | 20
    2.0000 |
    4.0000 | 40
    5.0000 | 50
    3.0000 |
   (8 rows)
   ```
   **og result**
   ```
   openGauss=# select avg(id),a from t_ssdb_tb group by a;
             avg           | a
   ------------------------+----
        2.0000000000000000 | 20
        4.0000000000000000 | 40
        5.0000000000000000 | 50
    1.00000000000000000000 | 10
        2.2500000000000000 |
   (5 rows)
   ```
   
   
   ### Example codes for reproduce this issue (such as a github link).
   


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