[GitHub] [incubator-shardingsphere] fantacy2001 commented on issue #4861: two tables left join with different routing rules are not supported
fantacy2001 commented on issue #4861: two tables left join with different routing rules are not supported URL: https://github.com/apache/incubator-shardingsphere/issues/4861#issuecomment-605386243 > @fantacy2001 any more questions? no more ,thanks ! 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [incubator-shardingsphere] fantacy2001 commented on issue #4861: two tables left join with different routing rules are not supported
fantacy2001 commented on issue #4861: two tables left join with different routing rules are not supported URL: https://github.com/apache/incubator-shardingsphere/issues/4861#issuecomment-605386191 > > > Can you use SQL to explain your expected behaviour? > > > > > > shardingsphere's route is no problem. > > i mean a convention is : > > ```sql > > select a.*,b.* from a left join b on a.col = b.col where a.col = '123' > > ``` > > > > > > but not : > > ```sql > > select a.*,b.* from a left join b on a.col = b.col where a.col = '123' and b.col = '123' > > ``` > > What is your original SQL, does the original SQL include `and b.col = '123'`? > > > t does not affect the function, but talk about whether it is possible to optimize it > > What is t? sorry ,Should be ‘it’ ,‘t’ is my fault 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [incubator-shardingsphere] fantacy2001 commented on issue #4861: two tables left join with different routing rules are not supported
fantacy2001 commented on issue #4861: two tables left join with different routing rules are not supported URL: https://github.com/apache/incubator-shardingsphere/issues/4861#issuecomment-604801451 > Can you use SQL to explain your expected behaviour? shardingsphere's route is no problem. i mean a convention is : select a.*,b.* from a left join b on a.col = b.col where a.col = '123' but not : select a.*,b.* from a left join b on a.col = b.col where a.col = '123' and b.col = '123' t does not affect the function, but talk about whether it is possible to optimize it 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [incubator-shardingsphere] fantacy2001 commented on issue #4861: two tables left join with different routing rules are not supported
fantacy2001 commented on issue #4861: two tables left join with different routing rules are not supported URL: https://github.com/apache/incubator-shardingsphere/issues/4861#issuecomment-604351181 > @fantacy2001 The current route result is correct. What is your expected? i expected the sharding key in the condition 'on' after 'join', able to transmit sharding value in where condition ,Instead of writing it again in where condition 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [incubator-shardingsphere] fantacy2001 commented on issue #4861: two tables left join with different routing rules are not supported
fantacy2001 commented on issue #4861: two tables left join with different routing rules are not supported URL: https://github.com/apache/incubator-shardingsphere/issues/4861#issuecomment-604263642 > When the shardingsphere route the sql, it does not find the table b's sharding key, so it will cause a full route. > To avoid it, you may add the table b's sharding key after where condition.And now shardingsphere may not use the condition after 'on' clause. In the future,Whether shardingsphere can be considered ‘on’ after join? because by convention, For old system upgrades, only write main table's sharding value after 'where' 。 or add config like bindtables ,to achieve this function 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [incubator-shardingsphere] fantacy2001 commented on issue #4861: two tables left join with different routing rules are not supported
fantacy2001 commented on issue #4861: two tables left join with different routing rules are not supported URL: https://github.com/apache/incubator-shardingsphere/issues/4861#issuecomment-604187682 > What is your sharding rule configuration? sharding rule: in the db and table ShardingAlgorithm, i mapping the dbs and tables by columns 'col', like: Map dbMap = new HashMap(); static{ dbMap.put("123","db_01"); dbMap.put("125","db_02") } Map tableMap = new HashMap(); static{ tableMap.put("123","table_001"); tableMap.put("125","table_002") } i mean on the join condition, Whether the sharding key after "on" should be transitive? I didn't find it in the source code. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [incubator-shardingsphere] fantacy2001 commented on issue #4861: two tables left join with different routing rules are not supported
fantacy2001 commented on issue #4861: two tables left join with different routing rules are not supported URL: https://github.com/apache/incubator-shardingsphere/issues/4861#issuecomment-601768249 > b.col is sharding key: > > > b.col = '123' However, by convention, two tables join, only the main table write value(a.col='123') in the where condition, The sub table obtains the value of the where condition through the ’on’ condition in the join. if both main table and sub table write value in the where condition, feel very uncomfortable 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services