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/11/29 10:13:07 UTC
[GitHub] [shardingsphere] qiuweilu opened a new issue #13851: Multiple left join errors
qiuweilu opened a new issue #13851:
URL: https://github.com/apache/shardingsphere/issues/13851
5.0.0
Multiple left joins contain split table errors
--
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
[GitHub] [shardingsphere] qiuweilu commented on issue #13851: Multiple left join errors
Posted by GitBox <gi...@apache.org>.
qiuweilu commented on issue #13851:
URL: https://github.com/apache/shardingsphere/issues/13851#issuecomment-985270842
spring.shardingsphere.rules.sharding.tables.user_media.actual-data-nodes=ds0.user_media_$->{0..9}
spring.shardingsphere.rules.sharding.tables.user_media.table-strategy.standard.sharding-column=part_fkid
spring.shardingsphere.rules.sharding.tables.user_media.table-strategy.standard.sharding-algorithm-name=t-media-inline
spring.shardingsphere.rules.sharding.sharding-algorithms.t-media-inline.type=INLINE
spring.shardingsphere.rules.sharding.sharding-algorithms.t-media-inline.props.algorithm-expression=user_media_$->{part_fkid % 10}
spring.shardingsphere.rules.sharding.tables.part_cmnt.actual-data-nodes=ds0.part_cmnt_$->{0..9}
spring.shardingsphere.rules.sharding.tables.part_cmnt.table-strategy.standard.sharding-column=part_fkid
spring.shardingsphere.rules.sharding.tables.part_cmnt.table-strategy.standard.sharding-algorithm-name=t-cmnt-inline
spring.shardingsphere.rules.sharding.sharding-algorithms.t-cmnt-inline.type=INLINE
spring.shardingsphere.rules.sharding.sharding-algorithms.t-cmnt-inline.props.algorithm-expression=part_cmnt_$->{part_fkid % 10}
spring.shardingsphere.rules.sharding.tables.part_vote.actual-data-nodes=ds0.part_vote_$->{0..9}
spring.shardingsphere.rules.sharding.tables.part_vote.table-strategy.standard.sharding-column=part_fkid
spring.shardingsphere.rules.sharding.tables.part_vote.table-strategy.standard.sharding-algorithm-name=t-vote-inline
spring.shardingsphere.rules.sharding.sharding-algorithms.t-vote-inline.type=INLINE
spring.shardingsphere.rules.sharding.sharding-algorithms.t-vote-inline.props.algorithm-expression=part_vote_$->{part_fkid % 10}
spring.shardingsphere.rules.sharding.tables.part_apply.actual-data-nodes=ds0.part_apply_$->{0..9}
spring.shardingsphere.rules.sharding.tables.part_apply.table-strategy.standard.sharding-column=part_fkid
spring.shardingsphere.rules.sharding.tables.part_apply.table-strategy.standard.sharding-algorithm-name=t-apply-inline
spring.shardingsphere.rules.sharding.sharding-algorithms.t-apply-inline.type=INLINE
spring.shardingsphere.rules.sharding.sharding-algorithms.t-apply-inline.props.algorithm-expression=part_apply_$->{part_fkid % 10}
spring.shardingsphere.rules.sharding.tables.act_stats.actual-data-nodes=ds0.act_stats_$->{0..9}
spring.shardingsphere.rules.sharding.tables.act_stats.table-strategy.standard.sharding-column=part_fkid
spring.shardingsphere.rules.sharding.tables.act_stats.table-strategy.standard.sharding-algorithm-name=t-stats-inline
spring.shardingsphere.rules.sharding.sharding-algorithms.t-stats-inline.type=INLINE
spring.shardingsphere.rules.sharding.sharding-algorithms.t-stats-inline.props.algorithm-expression=act_stats_$->{part_fkid % 10}
spring.shardingsphere.rules.sharding.tables.user_earn.actual-data-nodes=ds0.user_earn_$->{0..9}
spring.shardingsphere.rules.sharding.tables.user_earn.table-strategy.standard.sharding-column=part_fkid
spring.shardingsphere.rules.sharding.tables.user_earn.table-strategy.standard.sharding-algorithm-name=t-earn-inline
spring.shardingsphere.rules.sharding.sharding-algorithms.t-earn-inline.type=INLINE
spring.shardingsphere.rules.sharding.sharding-algorithms.t-earn-inline.props.algorithm-expression=user_earn_$->{part_fkid % 10}
--
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
[GitHub] [shardingsphere] strongduanmu commented on issue #13851: Multiple left join errors
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #13851:
URL: https://github.com/apache/shardingsphere/issues/13851#issuecomment-1018060726
Since there is no reply for a long time, I will close this issue first. If you have other questions, please submit new issue feedback.
--
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
[GitHub] [shardingsphere] RaigorJiang commented on issue #13851: Multiple left join errors
Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #13851:
URL: https://github.com/apache/shardingsphere/issues/13851#issuecomment-982250380
> example SELECT out_cmnt.cmnt_id cmnt_id, out_cmnt.cmnt_pid cmnt_pid, out_cmnt.cmnt_gid cmnt_gid, out_cmnt.cmnt_mark cmnt_mark, out_cmnt.cmnt_label cmnt_label, out_cmnt.cmnt_cont cmnt_cont, out_cmnt.cmnt_json cmnt_json, out_cmnt.cmnt_data cmnt_data, out_cmnt.cmnt_num_pid cmnt_num_pid, out_cmnt.cmnt_num_gid cmnt_num_gid, out_cmnt.for_uid for_uid, out_cmnt.user_id user_id, out_cmnt.cmnt_ctime cmnt_ctime, out_cmnt.part_fkid part_fkid, out_cmnt.vote_bind vote_bind, out_cmnt.vote_label vote_label, IF(vote_bind IS NULL, 0, out_cmnt.vote_num) vote_num , vote_user_tab.user_id vote_uid FROM ( SELECT cmnt_tab., count(cmnt_tab.cmnt_id) vote_num, vote_bind_tab.bind_fkid vote_bind, vote_bind_tab.vote_label vote_label FROM ( SELECT base_cmnt. FROM part_cmnt base_cmnt WHERE base_cmnt.part_fkid = #{partFkid,jdbcType=BIGINT} AND base_cmnt.cmnt_label = #{cmntLabel,jdbcType=VARCHAR} AND base_cmnt.cmnt_mark = #{cmntMark,jdbcType=VARCHAR} AND base_cmnt.cmnt_score <= #{cmntScore,jdbcType=INTEGER} AND
base_cmnt.cmnt_ctime >= #{cmntCtime,jdbcType=TIMESTAMP} AND base_cmnt.cmnt_del = 0 AND base_cmnt.cmnt_pid = 0 AND base_cmnt.cmnt_pid != 0 AND base_cmnt.cmnt_gid = #{cmntPid,jdbcType=BIGINT} ORDER BY base_cmnt.cmnt_id DESC LIMIT 2000 ) cmnt_tab LEFT JOIN part_vote vote_bind_tab ON vote_bind_tab.bind_fkid = cmnt_tab.cmnt_id AND vote_bind_tab.part_fkid = #{partFkid,jdbcType=BIGINT} AND vote_bind_tab.vote_label = #{voteLabel,jdbcType=VARCHAR} AND vote_bind_tab.vote_mark = #{voteMark,jdbcType=VARCHAR} AND vote_bind_tab.vote_del = 0 GROUP BY cmnt_tab.cmnt_id ) out_cmnt LEFT JOIN part_vote vote_user_tab ON vote_user_tab.bind_fkid = out_cmnt.cmnt_id AND vote_user_tab.user_id = #{userId,jdbcType=BIGINT} AND vote_user_tab.part_fkid = #{partFkid,jdbcType=BIGINT} AND vote_user_tab.vote_label = #{voteLabel,jdbcType=VARCHAR} AND vote_user_tab.vote_mark = #{voteMark,jdbcType=VARCHAR} AND vote_user_tab.vote_del = 0 GROUP BY cmnt_id
>
> describe column part_fkid is sub table foreign key,but it doesn't work in left sql
Thanks for your feedback, can you provide `Logic SQL`?
`Logic SQL` can be Obtained from the log, by setting `sql-show` to `true`.
Because such a mapper is not easy to read and verify.
--
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
[GitHub] [shardingsphere] RaigorJiang commented on issue #13851: Multiple left join errors
Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #13851:
URL: https://github.com/apache/shardingsphere/issues/13851#issuecomment-982251203
Props for JDBC:
https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-jdbc/yaml-config/rules/mix/
Props for Proxy:
https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-proxy/props/
--
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
[GitHub] [shardingsphere] RaigorJiang commented on issue #13851: Multiple left join errors
Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #13851:
URL: https://github.com/apache/shardingsphere/issues/13851#issuecomment-984375527
@strongduanmu , Please help to see, thank you~
--
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
[GitHub] [shardingsphere] qiuweilu commented on issue #13851: Multiple left join errors
Posted by GitBox <gi...@apache.org>.
qiuweilu commented on issue #13851:
URL: https://github.com/apache/shardingsphere/issues/13851#issuecomment-982246817
example
<select id="searchCmntList" parameterType="com.foxwish.dao.entity.ext.PartCmntVote" resultMap="BaseResultMap">
SELECT out_cmnt.cmnt_id cmnt_id, out_cmnt.cmnt_pid cmnt_pid, out_cmnt.cmnt_gid cmnt_gid, out_cmnt.cmnt_mark cmnt_mark,
out_cmnt.cmnt_label cmnt_label, out_cmnt.cmnt_cont cmnt_cont, out_cmnt.cmnt_json cmnt_json, out_cmnt.cmnt_data cmnt_data,
out_cmnt.cmnt_num_pid cmnt_num_pid, out_cmnt.cmnt_num_gid cmnt_num_gid, out_cmnt.for_uid for_uid, out_cmnt.user_id user_id,
out_cmnt.cmnt_ctime cmnt_ctime, out_cmnt.part_fkid part_fkid, out_cmnt.vote_bind vote_bind, out_cmnt.vote_label vote_label,
IF(vote_bind IS NULL, 0, out_cmnt.vote_num) vote_num <if test="userId != null and userId > 0">, vote_user_tab.user_id vote_uid</if>
FROM
(
SELECT cmnt_tab.*, count(cmnt_tab.cmnt_id) vote_num, vote_bind_tab.bind_fkid vote_bind, vote_bind_tab.vote_label vote_label
FROM
(
<!-- 基础.评论数据 -->
SELECT base_cmnt.* FROM part_cmnt base_cmnt
WHERE base_cmnt.part_fkid = #{partFkid,jdbcType=BIGINT}
AND base_cmnt.cmnt_label = #{cmntLabel,jdbcType=VARCHAR}
AND base_cmnt.cmnt_mark = #{cmntMark,jdbcType=VARCHAR}
AND base_cmnt.cmnt_score <= #{cmntScore,jdbcType=INTEGER}
AND base_cmnt.cmnt_ctime >= #{cmntCtime,jdbcType=TIMESTAMP}
AND base_cmnt.cmnt_del = 0
<if test="cmntPid != null and cmntPid == 0">
AND base_cmnt.cmnt_pid = 0
</if>
<if test="cmntPid != null and cmntPid > 0">
AND base_cmnt.cmnt_pid != 0
AND base_cmnt.cmnt_gid = #{cmntPid,jdbcType=BIGINT}
</if>
ORDER BY base_cmnt.cmnt_id DESC
LIMIT 2000
) cmnt_tab
<!-- 评论.点赞数据 -->
LEFT JOIN part_vote vote_bind_tab ON vote_bind_tab.bind_fkid = cmnt_tab.cmnt_id
AND vote_bind_tab.part_fkid = #{partFkid,jdbcType=BIGINT}
AND vote_bind_tab.vote_label = #{voteLabel,jdbcType=VARCHAR}
AND vote_bind_tab.vote_mark = #{voteMark,jdbcType=VARCHAR}
AND vote_bind_tab.vote_del = 0
GROUP BY cmnt_tab.cmnt_id
) out_cmnt
<!-- 评论.点赞用户 -->
<if test="userId != null and userId > 0">
LEFT JOIN part_vote vote_user_tab ON vote_user_tab.bind_fkid = out_cmnt.cmnt_id
AND vote_user_tab.user_id = #{userId,jdbcType=BIGINT}
AND vote_user_tab.part_fkid = #{partFkid,jdbcType=BIGINT}
AND vote_user_tab.vote_label = #{voteLabel,jdbcType=VARCHAR}
AND vote_user_tab.vote_mark = #{voteMark,jdbcType=VARCHAR}
AND vote_user_tab.vote_del = 0
GROUP BY cmnt_id
</if>
</select>
describe
column part_fkid is sub table foreign key,but it doesn't work in left sql
--
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
[GitHub] [shardingsphere] strongduanmu edited a comment on issue #13851: Multiple left join errors
Posted by GitBox <gi...@apache.org>.
strongduanmu edited a comment on issue #13851:
URL: https://github.com/apache/shardingsphere/issues/13851#issuecomment-985359552
@qiuweilu Judging from the configuration you provided, this is a complex subquery statement and includes aggregation operations.
This type of statement Apache ShardingSphere needs to be supported by an experimental feature federation execution engine. For specific information, please refer to the document: https://shardingsphere.apache.org/document/current/cn/features/sharding/use-norms/sql .
--
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
[GitHub] [shardingsphere] RaigorJiang commented on issue #13851: Multiple left join errors
Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #13851:
URL: https://github.com/apache/shardingsphere/issues/13851#issuecomment-982213335
Hi @qiuweilu ,
Can you explain in more detail? Or to give an example, the requirement of one sentence cannot be well understood.
--
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
[GitHub] [shardingsphere] qiuweilu edited a comment on issue #13851: Multiple left join errors
Posted by GitBox <gi...@apache.org>.
qiuweilu edited a comment on issue #13851:
URL: https://github.com/apache/shardingsphere/issues/13851#issuecomment-985270842
```properties
spring.shardingsphere.rules.sharding.tables.user_media.actual-data-nodes=ds0.user_media_$->{0..9}
spring.shardingsphere.rules.sharding.tables.user_media.table-strategy.standard.sharding-column=part_fkid
spring.shardingsphere.rules.sharding.tables.user_media.table-strategy.standard.sharding-algorithm-name=t-media-inline
spring.shardingsphere.rules.sharding.sharding-algorithms.t-media-inline.type=INLINE
spring.shardingsphere.rules.sharding.sharding-algorithms.t-media-inline.props.algorithm-expression=user_media_$->{part_fkid % 10}
spring.shardingsphere.rules.sharding.tables.part_cmnt.actual-data-nodes=ds0.part_cmnt_$->{0..9}
spring.shardingsphere.rules.sharding.tables.part_cmnt.table-strategy.standard.sharding-column=part_fkid
spring.shardingsphere.rules.sharding.tables.part_cmnt.table-strategy.standard.sharding-algorithm-name=t-cmnt-inline
spring.shardingsphere.rules.sharding.sharding-algorithms.t-cmnt-inline.type=INLINE
spring.shardingsphere.rules.sharding.sharding-algorithms.t-cmnt-inline.props.algorithm-expression=part_cmnt_$->{part_fkid % 10}
spring.shardingsphere.rules.sharding.tables.part_vote.actual-data-nodes=ds0.part_vote_$->{0..9}
spring.shardingsphere.rules.sharding.tables.part_vote.table-strategy.standard.sharding-column=part_fkid
spring.shardingsphere.rules.sharding.tables.part_vote.table-strategy.standard.sharding-algorithm-name=t-vote-inline
spring.shardingsphere.rules.sharding.sharding-algorithms.t-vote-inline.type=INLINE
spring.shardingsphere.rules.sharding.sharding-algorithms.t-vote-inline.props.algorithm-expression=part_vote_$->{part_fkid % 10}
spring.shardingsphere.rules.sharding.tables.part_apply.actual-data-nodes=ds0.part_apply_$->{0..9}
spring.shardingsphere.rules.sharding.tables.part_apply.table-strategy.standard.sharding-column=part_fkid
spring.shardingsphere.rules.sharding.tables.part_apply.table-strategy.standard.sharding-algorithm-name=t-apply-inline
spring.shardingsphere.rules.sharding.sharding-algorithms.t-apply-inline.type=INLINE
spring.shardingsphere.rules.sharding.sharding-algorithms.t-apply-inline.props.algorithm-expression=part_apply_$->{part_fkid % 10}
spring.shardingsphere.rules.sharding.tables.act_stats.actual-data-nodes=ds0.act_stats_$->{0..9}
spring.shardingsphere.rules.sharding.tables.act_stats.table-strategy.standard.sharding-column=part_fkid
spring.shardingsphere.rules.sharding.tables.act_stats.table-strategy.standard.sharding-algorithm-name=t-stats-inline
spring.shardingsphere.rules.sharding.sharding-algorithms.t-stats-inline.type=INLINE
spring.shardingsphere.rules.sharding.sharding-algorithms.t-stats-inline.props.algorithm-expression=act_stats_$->{part_fkid % 10}
spring.shardingsphere.rules.sharding.tables.user_earn.actual-data-nodes=ds0.user_earn_$->{0..9}
spring.shardingsphere.rules.sharding.tables.user_earn.table-strategy.standard.sharding-column=part_fkid
spring.shardingsphere.rules.sharding.tables.user_earn.table-strategy.standard.sharding-algorithm-name=t-earn-inline
spring.shardingsphere.rules.sharding.sharding-algorithms.t-earn-inline.type=INLINE
spring.shardingsphere.rules.sharding.sharding-algorithms.t-earn-inline.props.algorithm-expression=user_earn_$->{part_fkid % 10}
```
--
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
[GitHub] [shardingsphere] strongduanmu commented on issue #13851: Multiple left join errors
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #13851:
URL: https://github.com/apache/shardingsphere/issues/13851#issuecomment-984376598
> @strongduanmu , Please help to see, thank you~
@RaigorJiang Thank you for your remind, I will track 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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] qiuweilu commented on issue #13851: Multiple left join errors
Posted by GitBox <gi...@apache.org>.
qiuweilu commented on issue #13851:
URL: https://github.com/apache/shardingsphere/issues/13851#issuecomment-984350899
SELECT *
FROM (SELECT cmnt_tab.*,
count(cmnt_tab.cmnt_id) vote_num,
vote_bind_tab.bind_fkid vote_bind,
vote_bind_tab.vote_label vote_label
FROM (
SELECT base_cmnt.*
FROM part_cmnt base_cmnt
WHERE base_cmnt.part_fkid = ? #-- 1 Sub table foreign key
ORDER BY base_cmnt.cmnt_id DESC
LIMIT 2000)
cmnt_tab LEFT JOIN part_vote vote_bind_tab
ON vote_bind_tab.bind_fkid = cmnt_tab.cmnt_id
AND vote_bind_tab.part_fkid = ? #-- 2 Sub table foreign key
GROUP BY cmnt_tab.cmnt_id
) out_cmnt LEFT JOIN part_vote_1 vote_user_tab
ON vote_user_tab.bind_fkid = out_cmnt.cmnt_id
AND vote_user_tab.part_fkid = ? #-- 3 Sub table foreign key
GROUP BY cmnt_id
LIMIT ?
question
#-- 1 Sub table foreign key,it works ok
#-- 2 Sub table foreign key,it doesn't work (left join)
#-- 3 Sub table foreign key,it doesn't work (left join)
--
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
[GitHub] [shardingsphere] strongduanmu commented on issue #13851: Multiple left join errors
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #13851:
URL: https://github.com/apache/shardingsphere/issues/13851#issuecomment-984377302
Hi @qiuweilu, can you provide your sharding configuration and exception info? Judging from the information that you provided, I cannot reproduce the problem quickly.
--
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
[GitHub] [shardingsphere] strongduanmu closed issue #13851: Multiple left join errors
Posted by GitBox <gi...@apache.org>.
strongduanmu closed issue #13851:
URL: https://github.com/apache/shardingsphere/issues/13851
--
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
[GitHub] [shardingsphere] qiuweilu edited a comment on issue #13851: Multiple left join errors
Posted by GitBox <gi...@apache.org>.
qiuweilu edited a comment on issue #13851:
URL: https://github.com/apache/shardingsphere/issues/13851#issuecomment-984350899
```sql
SELECT *
FROM (SELECT cmnt_tab.*,
count(cmnt_tab.cmnt_id) vote_num,
vote_bind_tab.bind_fkid vote_bind,
vote_bind_tab.vote_label vote_label
FROM (
SELECT base_cmnt.*
FROM part_cmnt base_cmnt
WHERE base_cmnt.part_fkid = ? #-- 1 Sub table foreign key
ORDER BY base_cmnt.cmnt_id DESC
LIMIT 2000)
cmnt_tab LEFT JOIN part_vote vote_bind_tab
ON vote_bind_tab.bind_fkid = cmnt_tab.cmnt_id
AND vote_bind_tab.part_fkid = ? #-- 2 Sub table foreign key
GROUP BY cmnt_tab.cmnt_id
) out_cmnt LEFT JOIN part_vote_1 vote_user_tab
ON vote_user_tab.bind_fkid = out_cmnt.cmnt_id
AND vote_user_tab.part_fkid = ? #-- 3 Sub table foreign key
GROUP BY cmnt_id
LIMIT ?
```
question
#-- 1 Sub table foreign key,it works ok
#-- 2 Sub table foreign key,it doesn't work (left join)
#-- 3 Sub table foreign key,it doesn't work (left join)
--
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
[GitHub] [shardingsphere] strongduanmu commented on issue #13851: Multiple left join errors
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #13851:
URL: https://github.com/apache/shardingsphere/issues/13851#issuecomment-985359552
@qiuweilu Judging from the configuration you provided, this is a complex subquery statement and includes aggregation operations. This type of statement Apache ShardingSphere needs to be supported by an experimental feature federation execution engine. For specific information, please refer to the document: https://shardingsphere.apache.org/document/current/cn/features/sharding/use-norms/sql .
--
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
[GitHub] [shardingsphere] strongduanmu edited a comment on issue #13851: Multiple left join errors
Posted by GitBox <gi...@apache.org>.
strongduanmu edited a comment on issue #13851:
URL: https://github.com/apache/shardingsphere/issues/13851#issuecomment-985359552
--
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