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(prql-compiler): ensure the formatted output end with a new line #1644

Merged
merged 1 commit into from Jan 30, 2023

Conversation

eitsupi
Copy link
Member

@eitsupi eitsupi commented Jan 30, 2023

I noticed that with or without signature comment, it switches with or without a newline at the end of SQL string.
I think it is better to have a new line at the end, so I add a new line at the end even without signature comment.

I have noticed this behavior on R (prqlr).

> "from a" |> prqlr::prql_compile(signature_comment = FALSE)
[1] "SELECT\n  *\nFROM\n  a"

> "from a" |> prqlr::prql_compile(signature_comment = TRUE)
[1] "SELECT\n  *\nFROM\n  a\n\n-- Generated by PRQL compiler version 0.4.1 (https://prql-lang.org)\n"

ToDo

  • Add test

@eitsupi eitsupi changed the title fix(prql-compiler): ensure the formatted output end with line break fix(prql-compiler): ensure the formatted output end with new line Jan 30, 2023
@eitsupi eitsupi changed the title fix(prql-compiler): ensure the formatted output end with new line fix(prql-compiler): ensure the formatted output end with a new line Jan 30, 2023
@eitsupi eitsupi marked this pull request as draft January 30, 2023 11:40
@eitsupi eitsupi marked this pull request as ready for review January 30, 2023 12:06
@aljazerzen
Copy link
Member

LGTM

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.

None yet

2 participants