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

support scientific notation for SQL literals #3448

Closed
kmitchener opened this issue Sep 11, 2022 · 2 comments
Closed

support scientific notation for SQL literals #3448

kmitchener opened this issue Sep 11, 2022 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@kmitchener
Copy link
Contributor

kmitchener commented Sep 11, 2022

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
(This section helps Arrow developers understand the context and why for this feature, in addition to the what)

Describe the solution you'd like
A clear and concise description of what you want to happen.

Would like to be able to use scientific notation for numerics:

Currently, DataFusion takes the "e" notation as a column alias.

DataFusion CLI v11.0.0select 1e3;
+----+
| e3 |
+----+
| 1  |
+----+
1 row in set. Query took 0.012 seconds.

Add issue in sqlparser-rs to address the parsing issue: apache/datafusion-sqlparser-rs#610

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@kmitchener kmitchener added the enhancement New feature or request label Sep 11, 2022
@andygrove andygrove added this to the 15.0.0 milestone Nov 3, 2022
@Jefffrey
Copy link
Contributor

Jefffrey commented Jan 2, 2023

Resolved by #4770 (which includes this fix apache/datafusion-sqlparser-rs#768)

Can now parse exponent literals:

DataFusion CLI v15.0.0select 1e3;
+---------------+
| Float64(1000) |
+---------------+
| 1000          |
+---------------+
1 row in set. Query took 0.002 seconds.

@alamb
Copy link
Contributor

alamb commented Jan 2, 2023

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants