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

[CALCITE-5265] Select operator' parentheses should be same with Union operator #2910

Closed
wants to merge 3 commits into from

Conversation

l4wei
Copy link
Contributor

@l4wei l4wei commented Sep 17, 2022

remove necessary parentheses on select clause.

/** Test case for
* <a href="https://issues.apache.org/jira/browse/CALCITE-5265">[CALCITE-5265]
* Select operator' parentheses should be same with Union operator</a>. */
@Test void testInsertValueWithDynamicParams() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any tests which cover what Julian has mentioned in the JIRA comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are many unit tests cover "insert into aTable select ? from bTable" in SqlParserTest.java. And RelToSqlConverterTest::testInsertValuesWithDynamicParams will cover "insert into aTable select ? from bTable union all select ? from cTable" mentioned by Julian in JIRA comment.

@@ -6352,6 +6352,20 @@ private void checkLiteral2(String expression, String expected) {
.withCalcite().ok(expectedCalciteX);
}

/** Test case for
* <a href="https://issues.apache.org/jira/browse/CALCITE-5265">[CALCITE-5265]
* Select operator' parentheses should be same with Union operator</a>. */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment should also be adapted according to the changes in JIRA title.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, done.

Copy link
Member

@libenchao libenchao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@l4wei Thanks the updating, the PR LGTM now, merging.

@libenchao
Copy link
Member

@l4wei I didn't notice Julian has another comment when I commented with "LGTM", could you add another test which addresses Julian's comment?

@l4wei
Copy link
Contributor Author

l4wei commented Sep 28, 2022

OK

@l4wei
Copy link
Contributor Author

l4wei commented Sep 28, 2022

I have added test that mentioned by Julian' last comment in third commit in this PR. FYI

Copy link
Member

@libenchao libenchao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, will merge in 24 hours if there is no more objections appear.

@libenchao libenchao closed this in b16df01 Sep 29, 2022
tanclary pushed a commit to tanclary/calcite that referenced this pull request Nov 11, 2022
tanclary pushed a commit to tanclary/calcite that referenced this pull request Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants