wj-li opened a new issue, #13814:
URL: https://github.com/apache/shardingsphere/issues/13814

   ## 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?
   The master branch 5.0.1-SNAPSHOT
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-JDBC
   
   ### Expected behavior
   Using 'sum(TOTAL_AMOUNT) as totalAmount ' in the SQL statement, should 
return the data of totalAmount .
   
   ### Actual behavior
   It returns null.
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   use Oracle11g database.
   
   ```
   2021-11-26 13:38:36,940 INFO  
DubboServerHandler-192.168.12.194:20880-thread-8 
o.a.s.i.executor.sql.log.SQLLogger 74 log ---- Logic SQL: SELECT * FROM ( 
SELECT TMP.*, ROWNUM ROW_ID FROM ( SELECT  TO_CHAR (STATIS_TIME, 'yyyy-mm-dd') 
as statisTimeStr,  BUSINESS_NO as businessNo, BUSINESS_TYPE as businessType, 
BANK_ID as bankId, sum(TOTAL_AMOUNT) as totalAmount  FROM T_DATA_STATIS  WHERE 
BANK_ID in  (  ?  ) and STATIS_TIME >= ?  and STATIS_TIME <= ?  GROUP BY 
TO_CHAR (STATIS_TIME, 'yyyy-mm-dd'), 
BUSINESS_NO,BANK_ID,BUSINESS_TYPE,TOTAL_AMOUNT) TMP WHERE ROWNUM <=?) WHERE 
ROW_ID > ?
   2021-11-26 13:38:36,940 INFO  
DubboServerHandler-192.168.12.194:20880-thread-8 
o.a.s.i.executor.sql.log.SQLLogger 74 log ---- SQLStatement: 
OracleSelectStatement(lock=Optional.empty, modelSegment=Optional.empty)
   2021-11-26 13:38:36,940 INFO  
DubboServerHandler-192.168.12.194:20880-thread-8 
o.a.s.i.executor.sql.log.SQLLogger 74 log ---- Actual SQL: ds0 ::: SELECT * 
FROM ( SELECT TMP.*, ROWNUM ROW_ID FROM ( SELECT TO_CHAR (STATIS_TIME, 
'yyyy-mm-dd') as statisTimeStr,  BUSINESS_NO as businessNo, BUSINESS_TYPE as 
businessType, BANK_ID as bankId, sum(TOTAL_AMOUNT) as totalAmount FROM 
T_DATA_STATIS_202111  WHERE BANK_ID in (  ? ) and STATIS_TIME >= ?   and 
STATIS_TIME <= ?  GROUP BY TO_CHAR (STATIS_TIME, 'yyyy-mm-dd'), 
BUSINESS_NO,BANK_ID,BUSINESS_TYPE,TOTAL_AMOUNT) TMP WHERE ROWNUM <=?) WHERE 
ROW_ID > ? ::: [1, 2021-11-01 13:38:18.0, 2021-11-26 13:38:18.0, 10, 0]
   2021-11-26 13:38:36,942 INFO  
DubboServerHandler-192.168.12.194:20880-thread-8 
c.d.g.p.r.DataStatisServiceRemoteImpl 62 selectByPage ---- json of result 
data:[{"bankId":1,"businessNo":"002","businessType":1,"statisTimeStr":"2021-11-02"},{"bankId":1,"businessNo":"001","businessType":0,"statisTimeStr":"2021-11-03"},{"bankId":1,"businessNo":"002","businessType":1,"statisTimeStr":"2021-11-04"},{"bankId":1,"businessNo":"002","businessType":1,"statisTimeStr":"2021-11-05"},{"bankId":1,"businessNo":"002","businessType":1,"statisTimeStr":"2021-11-05"},{"bankId":1,"businessNo":"002","businessType":2,"statisTimeStr":"2021-11-05"}]
   
   
   ```
   
   ### 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