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: remove wrong comment about having #4555

Merged
merged 1 commit into from
Dec 9, 2022
Merged

Conversation

jackwener
Copy link
Member

@jackwener jackwener commented Dec 8, 2022

Which issue does this PR close?

Closes #4554 .

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added the sql SQL Planner label Dec 8, 2022
@@ -1151,12 +1151,10 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
//
// For example:
//
// SELECT c1 AS m FROM t HAVING m > 10;
Copy link
Contributor

Choose a reason for hiding this comment

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

is there any bug for the implementation?

Copy link
Member Author

@jackwener jackwener Dec 9, 2022

Choose a reason for hiding this comment

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

currently this sql can't work.

is there any bug for the implementation?

Discussion about this, you can see #4556

Copy link
Contributor

Choose a reason for hiding this comment

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

Postgres agrees:

postgres=# create table t (c1 int);
CREATE TABLE
postgres=# insert into t  values (1), (2);
INSERT 0 2
postgres=# SELECT c1 AS m FROM t HAVING m > 10;
ERROR:  column "m" does not exist
LINE 1: SELECT c1 AS m FROM t HAVING m > 10;
                                     ^
postgres=# 

@@ -1151,12 +1151,10 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
//
// For example:
//
// SELECT c1 AS m FROM t HAVING m > 10;
Copy link
Contributor

Choose a reason for hiding this comment

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

Postgres agrees:

postgres=# create table t (c1 int);
CREATE TABLE
postgres=# insert into t  values (1), (2);
INSERT 0 2
postgres=# SELECT c1 AS m FROM t HAVING m > 10;
ERROR:  column "m" does not exist
LINE 1: SELECT c1 AS m FROM t HAVING m > 10;
                                     ^
postgres=# 

@alamb alamb merged commit 747e5a7 into apache:master Dec 9, 2022
@jackwener jackwener deleted the fix_comment branch December 9, 2022 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sql SQL Planner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wrong comment about having
4 participants