wsm12138 commented on issue #22173:
URL: 
https://github.com/apache/shardingsphere/issues/22173#issuecomment-1318434842

   ### version
   ```
   ShardingSphere-5.2.2-SNAPSHOT
   Commit ID: 753c0cee8ee6fd3db00536da55b64bc5198a3758
   Commit Message: Optimize sqlFederationExecutor init logic when 
sqlFederationType modify dynamically (#22209)
   Branch: 753c0cee8ee6fd3db00536da55b64bc5198a3758
   Build time: 2022-11-17T15:15:38+0800
   ```
   
   ### sql_federation_type= correct value
   ```
   sharding_db=> set dist variable sql_federation_type="ADVANCED";
   SUCCESS
   sharding_db=> select * from t_merchant union all select * from t_product;
    merchant_id |      country_id       | merchant_name | business_code |  
telephone  | creation_date
   
-------------+-----------------------+---------------+---------------+-------------+---------------
              1 | 86                    | tencent       | 86000001      | 
86100000001 | 2017-08-08
              2 | 86                    | haier         | 86000002      | 
86100000002 | 2017-08-08
              3 | 86                    | huawei        | 86000003      | 
86100000003 | 2017-08-08
              4 | 86                    | alibaba       | 86000004      | 
86100000004 | 2017-08-08
              5 | 86                    | lenovo        | 86000005      | 
86100000005 | 2017-08-08
              6 | 86                    | moutai        | 86000006      | 
86100000006 | 2017-08-08
              7 | 86                    | baidu         | 86000007      | 
86100000007 | 2017-08-08
              8 | 86                    | xiaomi        | 86000008      | 
86100000008 | 2017-08-08
              9 | 86                    | vivo          | 86000009      | 
86100000009 | 2017-08-08
             10 | 86                    | oppo          | 86000010      | 
86100000010 | 2017-08-08
             11 | 1                     | google        | 01000011      | 
01100000011 | 2017-08-08
             12 | 1                     | walmart       | 01000012      | 
01100000012 | 2017-08-08
             13 | 1                     | amazon        | 01000013      | 
01100000013 | 2017-08-08
             14 | 1                     | apple         | 01000014      | 
01100000014 | 2017-08-08
             15 | 1                     | microsoft     | 01000015      | 
01100000015 | 2017-08-08
             16 | 1                     | dell          | 01000016      | 
01100000016 | 2017-08-08
             17 | 1                     | johnson       | 01000017      | 
01100000017 | 2017-08-08
             18 | 1                     | intel         | 01000018      | 
01100000018 | 2017-08-08
             19 | 1                     | hp            | 01000019      | 
01100000019 | 2017-08-08
             20 | 1                     | tesla         | 01000020      | 
01100000020 | 2017-08-08
              1 | qq coins              | 2             | 200           | off 
sale    | 2017-08-08
              2 | haier washing machine | 4             | 3120.5        | on 
sale     | 2017-08-08
              3 | huawei mobile phones  | 6             | 6666          | on 
sale     | 2017-08-08
              4 | alibaba cloud cards   | 2             | 500           | on 
sale     | 2017-08-08
              5 | lenovo mobile phones  | 6             | 3200          | off 
sale    | 2017-08-08
              6 | moutai liquor         | 8             | 3200          | on 
sale     | 2017-08-08
              7 | baidu cloud cards     | 2             | 700           | on 
sale     | 2017-08-08
              8 | xiaomi mobile phones  | 6             | 2799          | on 
sale     | 2017-08-08
              9 | vivo mobile phones    | 6             | 2899          | on 
sale     | 2017-08-08
             10 | oppo mobile phones    | 6             | 2299          | on 
sale     | 2017-08-08
             11 | google mobile phones  | 6             | 3399          | on 
sale     | 2017-08-08
             12 | walmart wine          | 8             | 1000          | on 
sale     | 2017-08-08
             13 | amazon cloud cards    | 2             | 1000          | on 
sale     | 2017-08-08
             14 | apple mobile phones   | 6             | 8200          | on 
sale     | 2017-08-08
             15 | microsoft x-box       | 9             | 5000          | on 
sale     | 2017-08-08
             16 | dell xps              | 10            | 9000          | on 
sale     | 2017-08-08
             17 | johnson shampoo       | 12            | 30            | on 
sale     | 2017-08-08
             18 | intel cpu             | 10            | 1600          | on 
sale     | 2017-08-08
             19 | hp computer           | 10            | 4600          | on 
sale     | 2017-08-08
             20 | tesla model 3         | 14            | 324600        | on 
sale     | 2017-08-08
   (40 rows)
   ```
   
   ### sql_federation_type= wrong value
   ```
   sharding_db=> set dist variable sql_federation_type="ADVANCED1";
   SUCCESS
   sharding_db=> select * from t_merchant union all select * from t_product;
   ERROR:  ADVANCED1 is not a valid sqlFederationType.
   sharding_db=> show single tables;
       table_name    | resource_name
   ------------------+---------------
    t_merchant       | ds_9
    t_order_view     | ds_0
    t_product        | ds_8
    t_product_detail | ds_3
    t_user           | ds_1
   (5 rows)
   
   sharding_db=>
   ```
   


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