Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix](Nereids) give clean error message when there are subquery in the on clause #20211

Merged
merged 3 commits into from
Jun 6, 2023

Conversation

Reminiscent
Copy link
Contributor

Proposed changes

Before this PR

mysql> select a.k1 from baseall a join test b on b.k2 in (select 49);
ERROR 1105 (HY000): errCode = 2, detailMessage = Unexpected exception: nul

After this PR

mysql> select a.k1 from baseall a join test b on b.k2 in (select 49);
ERROR 1105 (HY000): errCode = 2, detailMessage = Unexpected exception: Not support OnClause contain Subquery, expr:k2 IN (INSUBQUERY) (LogicalOneRowRelation ( projects=[49 AS `49`#28], buildUnionNode=true ))

<--Describe your changes.-->
Add the rule for checking the join node in analysis/CheckAnalysis.java file. When we check the join node, we should check its' on clause. If there are some subquery expression, we should throw exception.

Further comments

If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...

@Reminiscent Reminiscent marked this pull request as ready for review May 30, 2023 10:28
@Reminiscent
Copy link
Contributor Author

run buildall

@Reminiscent
Copy link
Contributor Author

run buildall

@Reminiscent
Copy link
Contributor Author

run buildall

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jun 5, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2023

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2023

PR approved by anyone and no changes requested.

@morrySnow morrySnow merged commit a569d37 into apache:master Jun 6, 2023
@Reminiscent Reminiscent deleted the 4568 branch June 6, 2023 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. area/nereids dev/2.0-beta-merged reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants