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

unexpected spaces in scientific notation #3188

Open
2 tasks done
YuxiLing opened this issue Jul 31, 2023 · 1 comment
Open
2 tasks done

unexpected spaces in scientific notation #3188

YuxiLing opened this issue Jul 31, 2023 · 1 comment

Comments

@YuxiLing
Copy link

What happened?

It is similar to #1118 and #2860 (but not fixed after #2865). But I found this issue in the newest version.

PRQL compiler version:0.9.2

I found that prql compiler converts the big number (greater than 1e19 or approximately 2^63) to the format with scientifc notation. However, a space is in generated sql.

Error message from db: OperationalError: near "AS": syntax error

PRQL input

from tb1
select new_col=c0+ 10000000000000000000

SQL output

SELECT
  c0 + 1 e19 AS new_col
FROM
  tb1

Expected SQL output

SELECT
  c0 + 1E19 AS new_col
FROM
  tb1

MVCE confirmation

  • Minimal example
  • New issue

Anything else?

No response

@max-sixty
Copy link
Member

Thanks @YuxiLing , I added this to shssoichiro/sqlformat-rs#22.

@max-sixty max-sixty added sql-translation and removed bug Invalid compiler output or panic labels Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants