Skip to content

support scientific notation for SQL literals #3448

Closed

Description

@kmitchener

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.0
❯ select 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.

Activity

  1. added this to the 15.0.0 milestone on Nov 3, 2022
  2. Jefffrey commented on Jan 2, 2023

    @Jefffrey
    Contributor

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

    Can now parse exponent literals:

    DataFusion CLI v15.0.0
    ❯ select 1e3;
    +---------------+
    | Float64(1000) |
    +---------------+
    | 1000          |
    +---------------+
    1 row in set. Query took 0.002 seconds.
  3. alamb commented on Jan 2, 2023

    @alamb
    Contributor

    🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions