Open Weijun-H opened 9 months ago
I will take this ticket
Maybe @andygrove has some additional context / correct expected behavior -- he seems to have introduced this feature in https://github.com/apache/arrow-datafusion/pull/4102
set datafusion.sql_parser.parse_float_as_decimal=true;
Yes, it supports this feature only when set datafusion.sql_parser.parse_float_as_decimal=false;
For the record, here is what happens by default (set datafusion.sql_parser.parse_float_as_decimal=false;
)
❯ select 10e10;
+-----------------------+
| Float64(100000000000) |
+-----------------------+
| 1.0e11 |
+-----------------------+
1 row in set. Query took 0.024 seconds.
I made a comment in https://github.com/apache/arrow-datafusion/pull/4102 that We cannot enable by default until decimal support is farther along
. Unfortunately, I do not remember the specifics. Now that decimal support is farther along, maybe we can revisit this and try enabling by default (and eventually deprecate the option).
Is your feature request related to a problem or challenge?
Datafusion can't parse float as decimal if it is scientific notation.
Describe the solution you'd like
No response
Describe alternatives you've considered
No response
Additional context
No response