apache / apache/datafusion

Set default value of parse_float_as_decimal to true

Open
#14,612 2 comments 1 reaction 1 assignee Claimed by @neilconway View on GitHub
enhancement
Dominant language
Rust
Stars
9.3k
Forks
2.4k
Avg merge
3d 7h
Merged PRs (30d)
344

Description

### Is your feature request related to a problem or challenge?

According to the ANSI SQL specification, floating point numbers in SQL should be interpreted as decimals. We currently interpret them as floats:

```
pub struct SqlParserOptions {
/// When set to true, SQL parser will parse float as decimal type
pub parse_float_as_decimal: bool, default = false
```

### Describe the solution you'd like

Set default to true and fix regressions in test suite. This will likely involve fixing some bugs in type coercion such as https://github.com/apache/datafusion/issues/14272

### Describe alternatives you've considered

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.