userkdg opened a new issue #13972:
URL: https://github.com/apache/shardingsphere/issues/13972


   ## Bug Report
    subquery table set alias , proxy rewrite sql error .  such as :
   
   ``` sql
   MySQL [ec_order_db]> preview select count(1) as cnt from (select a.address 
from ec_oms_order a) as tmp;
   
+------------------+-----------------------------------------------------------------------------------------------+
   | data_source_name | sql                                                     
                                      |
   
+------------------+-----------------------------------------------------------------------------------------------+
   | ec_order_ds      | select count(1) as cnt from (select a.a.address_cipher 
AS address from ec_oms_order a) as tmp |
   
+------------------+-----------------------------------------------------------------------------------------------+
   
   ```
   
   ### Which version of ShardingSphere did you use?
   the lastest master
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   shardingsphere-proxy
   
   ### Expected behavior
   
   ``` sql 
    select count(1) as cnt from (select a.address_cipher AS address from 
ec_oms_order a) as tmp
   ```
   
   ### Actual behavior
   ``` sql 
   select count(1) as cnt from (select a.a.address_cipher AS address from 
ec_oms_order a) as tmp
   ```
   ### Reason analyze (If you can)
   EncryptPredicateColumnTokenGenerator
   
   ### 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