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

   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub 
issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere 
Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more 
details. 
   If no response anymore and we cannot reproduce it on current information, we 
will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   5.1.0
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   jdbc
   
   ### Expected behavior
   full result column 
   
   ### Actual behavior
   when use select group by select * in single database and single table 
missing result column
   
   ### Reason analyze (If you can)
   when remove shardingsphere resp,only use mybatis-plus ,execute method :
   ```
   ==>  Preparing: select bb.*, gg.total_price as totalPrice from (select 
o.user_id, sum(o.reward_number) as reward_number, sum(order_amount) as 
order_amount, sum(pay_wechat_amount) as pay_wechat_amount, 
sum(pay_account_amount) as pay_account_amount, sum(pay_coin_amount) as 
pay_coin_amount, sum(pay_points_amount) as pay_points_amount, 
sum(coupon_reduce) as coupon_reduce from TABLE1 o where 1=1 and o.goods_id = ? 
and o.current_box = ? and o.order_status = 20 and o.order_type = 0 group by 
o.`user_id` order by order_amount desc ) bb left join (select user_id, 
sum(g.number * g.retrieve_price) as total_price from TABLE2 g where 1=1 and 
g.goods_id = ? and g.current_box = ? group by `user_id`) gg on gg.user_id = 
bb.user_id
   ==> Parameters: 523(Integer), 1(Integer), 523(Integer), 1(Integer)
   <==    Columns: user_id, reward_number, order_amount, pay_wechat_amount, 
pay_account_amount, pay_coin_amount, pay_points_amount, coupon_reduce, 
totalPrice
   <==        Row: 34860, 10, 1110.00, 0.00, 1110.00, 0, 0.00, 0, 24008
   <==      Total: 1
   
   ```
   
   WHEN add  shardingsphere -jdbc ,execute method :
   ```
   ==>  Preparing: select bb.*, gg.total_price as totalPrice from (select 
o.user_id, sum(o.reward_number) as reward_number, sum(order_amount) as 
order_amount, sum(pay_wechat_amount) as pay_wechat_amount, 
sum(pay_account_amount) as pay_account_amount, sum(pay_coin_amount) as 
pay_coin_amount, sum(pay_points_amount) as pay_points_amount, 
sum(coupon_reduce) as coupon_reduce from reward_order o where 1=1 and 
o.goods_id = ? and o.current_box = ? and o.order_status = 20 and o.order_type = 
0 group by o.`user_id` order by order_amount desc ) bb left join (select 
user_id, sum(g.number * g.retrieve_price) as total_price from 
reward_order_goods g where 1=1 and g.goods_id = ? and g.current_box = ? group 
by `user_id`) gg on gg.user_id = bb.user_id
   ==> Parameters: 523(Integer), 1(Integer), 523(Integer), 1(Integer)
   <==    Columns: user_id, reward_number, order_amount
   <==        Row: 34860, 10, 1110.00
   <==      Total: 1
   
   ```
   
   SO,THIS COLUMN result  is missing :    pay_wechat_amount, 
pay_account_amount, pay_coin_amount, pay_points_amount, coupon_reduce, 
totalPrice , and java program debugging this properties is null ; 
   
   
   ### 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).
   


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