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

insertingnull bug #2700

Open
universalmind303 opened this issue Feb 23, 2024 · 0 comments
Open

insertingnull bug #2700

universalmind303 opened this issue Feb 23, 2024 · 0 comments
Labels
bug 🐛 Something isn't working

Comments

@universalmind303
Copy link
Contributor

Description

> create table test (value double);
> insert into test values (0.0), (null), (0.1), (2.0);
> select * from test;
┌─────────┐
│   value │
│      ── │
│ Float64 │
╞═════════╡
│ 0.00000 │
│ 0.10000 │
│ 0.10000 │
│ 2.00000 │
└─────────┘

Additional context

Clickhouse apparantly behaves similarly to ours and coerces the null to a zero, but we are inserting the wrong value all together.

If we wanted to mimic clickhouse behavior (which i think is also wrong), we should atleast have the correct values inserted 0.0 for row 2 instead of 0.1. (this may just be a display issue. IDK if we automatically coerce NULL to 0.0 when displaying.

I think duckdb's implementation has the most intuitive behavior here

D create table test (value double);
D insert into test values (0.0), (null), (0.1), (2.0);
D select * from test;
┌────────┐
│ value  │
│ double │
├────────┤
│    0.0 │
│        │
│    0.1 │
│    2.0 │
└────────┘
@universalmind303 universalmind303 added the bug 🐛 Something isn't working label Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant