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

Correction indentation when the HAVING clause contains AND/OR #50

Merged
merged 5 commits into from
Apr 23, 2024

Conversation

ppputtyo
Copy link
Contributor

@ppputtyo ppputtyo commented Apr 20, 2024

HAVING句がAND/ORを持つ場合にインデントがずれていたバグを修正しました。

After:

select
	id			as	id
,	sum(cnt)
from
	tbl
group by
	id
having
	sum(cnt)	>	1
and	avg(cnt)	<	10
;

close #49

@ppputtyo ppputtyo requested a review from tanzaku April 20, 2024 03:13

let mut clause = create_clause(cursor, src, "HAVING")?;
cursor.goto_next_sibling();
self.consume_comment_in_clause(cursor, src, &mut clause)?;
Copy link
Collaborator

Choose a reason for hiding this comment

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

今のテストケースだと consume_comment_in_clause の処理がなくても結果が変わらないと思うので、consume_comment_in_clause の動きが確認できるようなテストケースを追加お願いします

@tanzaku
Copy link
Collaborator

tanzaku commented Apr 22, 2024

close # 39

issue番号を間違えているようです。

@ppputtyo
Copy link
Contributor Author

@tanzaku
ありがとうございます。
指摘いただいた箇所を修正しました。

@tanzaku tanzaku merged commit f0a289a into main Apr 23, 2024
8 checks passed
@tanzaku tanzaku deleted the dev_kawabuchi_support_having_contains_and_or branch April 23, 2024 01:24
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.

Incorrect indentation when the HAVING clause contains AND/OR
2 participants