Skip to content

feat: make parse_float_as_decimal work on scientific notaion #8486

@Weijun-H

Description

@Weijun-H

Is your feature request related to a problem or challenge?

Datafusion can't parse float as decimal if it is scientific notation.

DataFusion CLI v33.0.0
❯ set datafusion.sql_parser.parse_float_as_decimal=true;
0 rows in set. Query took 0.014 seconds.

❯ select 10e10;
SQL error: ParserError("Cannot parse 10e10 as i128 when building decimal: invalid digit found in string")
❯ select -10e10;
SQL error: ParserError("Cannot parse 10e10 as i128 when building decimal: invalid digit found in string")

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions