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

   The number of shards in the table is 4, using USER-ID as the shard key
   
   Logic SQL: 
   /* SHARDINGSPHERE_HINT: DISABLE_AUDIT_NAMES=sharding_key_required_auditor, 
SKIP_SQL_REWRITE=true */ 
   SELECT * FROM T_ACCOUNT WHERE USERNAME=#{username} AND APP_ID = #{appId}
   
   Actual SQL:
   SELECT * FROM T_ACCOUNT WHERE USERNAME=#{username} AND APP_ID = #{appId}
   UNION ALL
   SELECT * FROM T_ACCOUNT WHERE USERNAME=#{username} AND APP_ID = #{appId}
   UNION ALL
   SELECT * FROM T_ACCOUNT WHERE USERNAME=#{username} AND APP_ID = #{appId}
   UNION ALL
   SELECT * FROM T_ACCOUNT WHERE USERNAME=#{username} AND APP_ID = #{appId}
   
   **How to effectively skip rewriting**
   
   **expect**
   SELECT * FROM T_ACCOUNT WHERE USERNAME=#{username} AND APP_ID = #{appId}
   
   


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