duckdb / duckdb-wasm

WebAssembly version of DuckDB
https://shell.duckdb.org
MIT License
1.2k stars 128 forks source link

Nonsensical formatting of intervals in duckdb wasm shell at https://shell.duckdb.org/ #1348

Closed bcolloran closed 3 months ago

bcolloran commented 1 year ago

What happens?

at https://shell.duckdb.org/, enter the following:

duckdb> (select interval '1 years' as intvl);
┌────────────────────────────────────────────────┐
│ intvl                                          │
╞════════════════════════════════════════════════╡
│ 0 years 0 mons 0 days 0 hours 0 mins 0.12 secs │
└────────────────────────────────────────────────┘
Elapsed: 1 ms

To Reproduce

at https://shell.duckdb.org/, enter the following:

duckdb> (select interval '1 years' as intvl);
┌────────────────────────────────────────────────┐
│ intvl                                          │
╞════════════════════════════════════════════════╡
│ 0 years 0 mons 0 days 0 hours 0 mins 0.12 secs │
└────────────────────────────────────────────────┘
Elapsed: 1 ms

Browser/Environment:

firefox 115.0.3

Device:

thinpad x1

DuckDB-Wasm Version:

@duckdb/duckdb-wasm@1.27.1-dev59.0

DuckDB-Wasm Deployment:

https://shell.duckdb.org/

Full Name:

bcolloran

Affiliation:

Rill Data

Y-- commented 1 year ago

Hi Brendan!

I think the issue is that DuckDB WASM isn't compiled with the ICU extension by default. It seems to work on DuckDB WASM that do enable the extension: image

carlopi commented 3 months ago

This can also be solved, due to arrow-rust having solved this problem upstream. See https://github.com/duckdb/duckdb-wasm/pull/1769