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

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   
   
[e3f6fbb](https://github.com/apache/shardingsphere/commit/e3f6fbb0b57d6b788b93b1196cdab355d13da085)
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ShardingSphere-JDBC
   
   ### Expected behavior
   
   Execute following sql successfully.
   
   ```sql
   SELECT
       INSTANCE_NAME,
       TEXT_FIELD,
       RECEIVE_USER_CODE,
       RECEIVE_USER_NAME,
       SUBMIT_USER_NAME,
       CREATE_TIME,
       WORKITEM_TYPE,
       ROOT_INSTANCE_ID,
       STATE,
       SUBMIT_TIME,
       DISPLAY_NAME,
       WORKFLOW_CODE,
       ACTIVITY_CODE,
       WORKITEM_ID,
       IS_READ,
       rm 
   FROM
       (
   SELECT
       INSTANCE_NAME,
       TEXT_FIELD,
       RECEIVE_USER_CODE,
       RECEIVE_USER_NAME,
       SUBMIT_USER_NAME,
       CREATE_TIME,
       WORKITEM_TYPE,
       ROOT_INSTANCE_ID,
       STATE,
       SUBMIT_TIME,
       DISPLAY_NAME,
       WORKFLOW_CODE,
       ACTIVITY_CODE,
       WORKITEM_ID,
       IS_READ,
       ROW_NUMBER () OVER ( PARTITION BY ROOT_INSTANCE_ID ORDER BY SUBMIT_TIME 
DESC ) rm 
   FROM
       OA_WORKITEMS 
   WHERE
       1 = 1 
       ) OW 
   WHERE
       rm = '1' 
       AND OW.ROOT_INSTANCE_ID IN ( 'b9dfc132-af9e-4f1a-a3ec-a65b0ab60929', 
'9c0128d5-0f72-43e1-ae93-0f07a9c89857', '927ad465-dda8-4263-a9bb-5e2eb7a9b63f', 
'8757e454-c8f2-49e4-8bfe-abbd85b966b4', '52769d52-fffb-4521-b98b-8e962afdf978', 
'9a4ceca5-7f5d-4ec7-a02e-0e4ee3532dce', '5359ab2c-dbc0-4f09-beab-e60c639d0f5a', 
'77ed4f27-215f-4ea9-8893-424e2c72eb1f', '5ed2afbf-6555-45b8-81c7-708b3cde3918', 
'79889fcb-4826-4b5f-b4e3-a5c32ba5d389' ) 
   ORDER BY
       DECODE(
       OW.ROOT_INSTANCE_ID,
       'b9dfc132-af9e-4f1a-a3ec-a65b0ab60929',
       '9c0128d5-0f72-43e1-ae93-0f07a9c89857',
       '927ad465-dda8-4263-a9bb-5e2eb7a9b63f',
       '8757e454-c8f2-49e4-8bfe-abbd85b966b4',
       '52769d52-fffb-4521-b98b-8e962afdf978',
       '9a4ceca5-7f5d-4ec7-a02e-0e4ee3532dce',
       '5359ab2c-dbc0-4f09-beab-e60c639d0f5a',
       '77ed4f27-215f-4ea9-8893-424e2c72eb1f',
       '5ed2afbf-6555-45b8-81c7-708b3cde3918',
       '79889fcb-4826-4b5f-b4e3-a5c32ba5d389' 
       )
   ```
   
   ### Actual behavior
   
   
![image](https://user-images.githubusercontent.com/10829171/198279767-4273b90e-c8ea-4f8c-9e69-1ae21fb36b5d.png)
   
   ### Reason analyze (If you can)
   
   ### 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