You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/08/20 01:47:58 UTC

[GitHub] [shardingsphere] strongduanmu edited a comment on issue #11794: SQL alias problem of join type.

strongduanmu edited a comment on issue #11794:
URL: https://github.com/apache/shardingsphere/issues/11794#issuecomment-902367368


   I found that the exception occurs only when the date field must be included, and other fields will not cause the exception. I used the following SQL to reproduce this problem.
   
   ```sql
   select s.content from t_single s inner join t_order_test t ON s.single_id = t.test_id WHERE date = '2021-08-20';
   ```
   
   t_single(single table):
   +-----------+--------------+------+-----+---------+-------+
   | Field     | Type         | Null | Key | Default | Extra |
   +-----------+--------------+------+-----+---------+-------+
   | single_id | int(11)      | YES  |     | NULL    |       |
   | content   | varchar(100) | YES  |     | NULL    |       |
   | date      | date         | YES  |     | NULL    |       |
   +-----------+--------------+------+-----+---------+-------+
   
   t_order_test(sharding table in same database):
   mysql> desc t_order_test;
   +---------+--------------+------+-----+---------+-------+
   | Field   | Type         | Null | Key | Default | Extra |
   +---------+--------------+------+-----+---------+-------+
   | test_id | int(11)      | YES  |     | NULL    |       |
   | content | varchar(100) | YES  |     | NULL    |       |
   +---------+--------------+------+-----+---------+-------+


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org