duckdb / duckdb-wasm

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

Type conversion errors not thrown with duckdb-wasm #1662

Closed ilyabo closed 3 months ago

ilyabo commented 6 months ago

What happens?

At least some queries with conversion errors don't throw, but return an empty result set, when run via AsyncDuckDBConnection.query(). For example, this query:

select '24:01:01'::time 

throws Conversion Error: time field value out of range in the shell, but just returns 0 rows without any errors when using conn.query() which is misleading.

To Reproduce

Run this example:

https://gist.githubusercontent.com/ilyabo/4c5a6421c55fb9fdca09c04081b21d75/raw/3025c5db72127573b2f643dbd6b663fa832232dc/index.html

It doesn't throw an error, but outputs the result:

Browser/Environment:

Chrome 122

Device:

Macbook Pro M1

DuckDB-Wasm Version:

1.28.0, 1.28.1-dev106.0

DuckDB-Wasm Deployment:

custom app

Full Name:

Ilya Boyandin

Affiliation:

GeoVisually

jonathanswenson commented 6 months ago

maybe similar to https://github.com/duckdb/duckdb-wasm/issues/1329 / #1347

carlopi commented 3 months ago

I just tried to reproduce, it seems to be properly solved by the current dev version, https://www.npmjs.com/package/@duckdb/duckdb-wasm/v/1.28.1-dev223.0.

Thanks a lot for raising this, it can now be closed.