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 2020/03/20 08:38:23 UTC
[GitHub] [incubator-shardingsphere] fantacy2001 opened a new issue #4861:
two tables left join with different routing rules are not supported
fantacy2001 opened a new issue #4861: two tables left join with different routing rules are not supported
URL: https://github.com/apache/incubator-shardingsphere/issues/4861
two tables left join, with different routing rules are not config binding tables, Will lead to full routing。
Table a and table b are divided into tables according to col field. Table b is divided into tables according to col field on each sharding database. Table a is not divided into tables. The sharding database route can be found, but sharding table rule of table b will not be found,Cause table b full routing
like this
select a.*,b.* from a left join b on a.col = b.col where a.col = '123'
sharding rule:
<sharding:table-rule logic-table="a" actual-data-nodes="ds_ms$->{0..1}.a" database-strategy-ref="databaseStrategy" />
<sharding:table-rule logic-table="b" actual-data-nodes="ds_ms0.b_000,ds_ms$->{0..1}.b_00$->{1..3}" database-strategy-ref="databaseStrategy" table-strategy-ref="tableStrategy" />
<sharding:standard-strategy id="databaseStrategy" sharding-column="col" precise-algorithm-ref="commonDBShardingAlgorithm"/>
<sharding:standard-strategy id="tableStrategy" sharding-column="col" precise-algorithm-ref="tableShardingAlgorithm"/>
actual sql:
select a.*,b.* from db0.a left join db0.b_001 on a.col = b.col where a.col = '123';
select a.*,b.* from db0.a left join db0.b_002 on a.col = b.col where a.col = '123';
select a.*,b.* from db0.a left join db0.b_003 on a.col = b.col where a.col = '123';
How to deal with this situation?
version: 4.0.0 release
----------------------------------------------------------------
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:
users@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
Posted by GitBox <gi...@apache.org>.
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:
<sharding:table-rule logic-table="a" actual-data-nodes="ds_ms$->{0..1}.a" database-strategy-ref="databaseStrategy" />
<sharding:table-rule logic-table="b" actual-data-nodes="ds_ms0.b_000,ds_ms$->{0..1}.b_00$->{1..3}" database-strategy-ref="databaseStrategy" table-strategy-ref="tableStrategy" />
<sharding:standard-strategy id="databaseStrategy" sharding-column="col" precise-algorithm-ref="commonDBShardingAlgorithm"/>
<sharding:standard-strategy id="tableStrategy" sharding-column="col" precise-algorithm-ref="tableShardingAlgorithm"/>
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] terrymanu commented on issue #4861: two
tables left join with different routing rules are not supported
Posted by GitBox <gi...@apache.org>.
terrymanu 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-604329727
@fantacy2001 The current route result is correct. What is your expected?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] terrymanu commented on issue #4861: two
tables left join with different routing rules are not supported
Posted by GitBox <gi...@apache.org>.
terrymanu 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-604520033
Can you use SQL to explain your expected behaviour?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] fantacy2001 edited a comment on issue
#4861: two tables left join with different routing rules are not supported
Posted by GitBox <gi...@apache.org>.
fantacy2001 edited a comment 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:
```xml
<sharding:table-rule logic-table="a" actual-data-nodes="ds_ms$->{0..1}.a" database-strategy-ref="databaseStrategy" />
<sharding:table-rule logic-table="b" actual-data-nodes="ds_ms0.b_000,ds_ms$->{0..1}.b_00$->{1..3}" database-strategy-ref="databaseStrategy" table-strategy-ref="tableStrategy" />
<sharding:standard-strategy id="databaseStrategy" sharding-column="col" precise-algorithm-ref="commonDBShardingAlgorithm"/>
<sharding:standard-strategy id="tableStrategy" sharding-column="col" precise-algorithm-ref="tableShardingAlgorithm"/>
```
in the db and table ShardingAlgorithm, i mapping the dbs and tables by columns 'col', like:
```java
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] terrymanu commented on issue #4861: two
tables left join with different routing rules are not supported
Posted by GitBox <gi...@apache.org>.
terrymanu 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-604805866
> > 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?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] ssxlulu commented on issue #4861: two
tables left join with different routing rules are not supported
Posted by GitBox <gi...@apache.org>.
ssxlulu 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-604259039
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.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] kimmking commented on issue #4861: two
tables left join with different routing rules are not supported
Posted by GitBox <gi...@apache.org>.
kimmking 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-604803764
ShardingSphere can support literal sharding-key conditions explicitly. Implicit semantic conditions is not in our current scope (other query optimization too).
So we can discuss how to go further for it. And if you are insterested in this point, making an investigation and make someproposals here is welcome.
----------------------------------------------------------------
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:
users@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
Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] kimmking commented on issue #4861: two
tables left join with different routing rules are not supported
Posted by GitBox <gi...@apache.org>.
kimmking 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-601694000
b.col is sharding key:
> b.col = '123'
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] kimmking edited a comment on issue
#4861: two tables left join with different routing rules are not supported
Posted by GitBox <gi...@apache.org>.
kimmking edited a comment on issue #4861: two tables left join with different routing rules are not supported
URL: https://github.com/apache/incubator-shardingsphere/issues/4861#issuecomment-604803764
ShardingSphere can support literal sharding-key conditions explicitly. Implicit semantic conditions are not in our current scope (other query optimizations too).
So we can discuss about how to go further for it. And if you are insterested in this topic, making an investigation and make someproposals here is welcome.
In your case above, my suggestion is to modify your sql:
1. Use sharding-key literally with `... b.col = 123`
2. Or split two sql, query from a with 123, and then query from b with sharding-key
----------------------------------------------------------------
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:
users@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
Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] fantacy2001 edited a comment on issue
#4861: two tables left join with different routing rules are not supported
Posted by GitBox <gi...@apache.org>.
fantacy2001 edited a comment 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:
users@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
Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] ssxlulu commented on issue #4861: two
tables left join with different routing rules are not supported
Posted by GitBox <gi...@apache.org>.
ssxlulu 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-604267702
> > 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
It depends on requirement and the implementation of the route algorithm.
In my opinion, shardingsphere may not considered the 'on' clause for routing.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] kimmking commented on issue #4861: two
tables left join with different routing rules are not supported
Posted by GitBox <gi...@apache.org>.
kimmking 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-604950208
@fantacy2001 anything more questions?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] terrymanu removed a comment on issue
#4861: two tables left join with different routing rules are not supported
Posted by GitBox <gi...@apache.org>.
terrymanu removed a comment on issue #4861: two tables left join with different routing rules are not supported
URL: https://github.com/apache/incubator-shardingsphere/issues/4861#issuecomment-604805587
> t does not affect the function
What is t?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] kimmking edited a comment on issue
#4861: two tables left join with different routing rules are not supported
Posted by GitBox <gi...@apache.org>.
kimmking edited a comment on issue #4861: two tables left join with different routing rules are not supported
URL: https://github.com/apache/incubator-shardingsphere/issues/4861#issuecomment-604803764
ShardingSphere can support literal sharding-key conditions explicitly. Implicit semantic conditions are not in our current scope (other query optimizations too).
So we can discuss about how to go further for it. And if you are insterested in this topic, making an investigation and make someproposals here is welcome.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] kimmking edited a comment on issue
#4861: two tables left join with different routing rules are not supported
Posted by GitBox <gi...@apache.org>.
kimmking edited a comment on issue #4861: two tables left join with different routing rules are not supported
URL: https://github.com/apache/incubator-shardingsphere/issues/4861#issuecomment-604803764
ShardingSphere can support literal sharding-key conditions explicitly. Implicit semantic conditions are not in our current scope (other query optimizations too).
So we can discuss about how to go further for it. And if you are insterested in this topic, making an investigation and make someproposals here is welcome.
In your case above, my suggestion is to modify your sql:
1. `... b.col = 123`
2. split two sql, query from a with 123, and then query from b with sharding-key
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] kimmking edited a comment on issue
#4861: two tables left join with different routing rules are not supported
Posted by GitBox <gi...@apache.org>.
kimmking edited a comment on issue #4861: two tables left join with different routing rules are not supported
URL: https://github.com/apache/incubator-shardingsphere/issues/4861#issuecomment-604950208
@fantacy2001 any more questions?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] fantacy2001 edited a comment on issue
#4861: two tables left join with different routing rules are not supported
Posted by GitBox <gi...@apache.org>.
fantacy2001 edited a comment 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 :
```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'
```
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:
users@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
Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] terrymanu commented on issue #4861: two
tables left join with different routing rules are not supported
Posted by GitBox <gi...@apache.org>.
terrymanu 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-603715978
What is your sharding rule configuration?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] fantacy2001 edited a comment on issue
#4861: two tables left join with different routing rules are not supported
Posted by GitBox <gi...@apache.org>.
fantacy2001 edited a comment 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:
<sharding:table-rule logic-table="a" actual-data-nodes="ds_ms$->{0..1}.a" database-strategy-ref="databaseStrategy" />
<sharding:table-rule logic-table="b" actual-data-nodes="ds_ms0.b_000,ds_ms$->{0..1}.b_00$->{1..3}" database-strategy-ref="databaseStrategy" table-strategy-ref="tableStrategy" />
<sharding:standard-strategy id="databaseStrategy" sharding-column="col" precise-algorithm-ref="commonDBShardingAlgorithm"/>
<sharding:standard-strategy id="tableStrategy" sharding-column="col" precise-algorithm-ref="tableShardingAlgorithm"/>
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] kimmking edited a comment on issue
#4861: two tables left join with different routing rules are not supported
Posted by GitBox <gi...@apache.org>.
kimmking edited a comment on issue #4861: two tables left join with different routing rules are not supported
URL: https://github.com/apache/incubator-shardingsphere/issues/4861#issuecomment-604803764
ShardingSphere can support literal sharding-key conditions explicitly. Implicit semantic conditions are not in our current scope (other query optimizations too).
So we can discuss about how to go further for it. And if you are insterested in this topic, making an investigation and some proposals here is welcome.
In your case above, my suggestion is to modify your sql:
1. Use sharding-key literally with `... b.col = 123`
2. Or split two sql, query from a with 123, and then query from b with sharding-key
----------------------------------------------------------------
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:
users@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
Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] terrymanu commented on issue #4861: two
tables left join with different routing rules are not supported
Posted by GitBox <gi...@apache.org>.
terrymanu 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-604805587
> t does not affect the function
What is t?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] terrymanu closed issue #4861: two tables
left join with different routing rules are not supported
Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #4861: two tables left join with different routing rules are not supported
URL: https://github.com/apache/incubator-shardingsphere/issues/4861
----------------------------------------------------------------
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:
users@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
Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org
With regards,
Apache Git Services