Skip to content

read_parquet crashes with 'stoi: no conversion' on GeoParquet files (WASM 1.33.1-dev40.0) #2199

@yharby

Description

@yharby

What happens?

read_parquet() on a GeoParquet file crashes with stoi: no conversion in DuckDB-WASM 1.33.1-dev40.0. Even DESCRIBE fails. The same file works fine in DuckDB CLI v1.5.1.

The error happens at the read_parquet() level before any geometry processing. Setting enable_geoparquet_conversion = false does not help — the crash is in Parquet metadata parsing itself.

To Reproduce

INSTALL httpfs; LOAD httpfs;
INSTALL spatial; LOAD spatial;

-- This crashes in WASM but works in CLI v1.5.1
DESCRIBE SELECT * FROM read_parquet('https://s3.us-west-2.amazonaws.com/us-west-2.opendata.source.coop/walkthru-earth/opensensor-space/share/suitability_analysis_of_aq.parquet');

Error:

Invalid Error: stoi: no conversion
LINE 1: DESCRIBE SELECT * FROM read_parquet('https://s3.us-west-2.amazonaws.com/us-west...
                               ^

CLI comparison (works)

$ duckdb --version
v1.5.1 (Variegata) 7dbb2e646f

$ duckdb -c "INSTALL httpfs; LOAD httpfs; INSTALL spatial; LOAD spatial; DESCRIBE SELECT * FROM read_parquet('https://s3.us-west-2.amazonaws.com/us-west-2.opendata.source.coop/walkthru-earth/opensensor-space/share/suitability_analysis_of_aq.parquet');"

┌────────────────────────────────────────┐
│                Describe                │
│ name             varchar               │
│ type             varchar               │
│ priority         varchar               │
│ nearest_existing varchar               │
│ distance_km      double                │
│ source           varchar               │
│ geom             geometry('ogc:crs84') │
└────────────────────────────────────────┘

The file has a geometry('ogc:crs84') column. The WASM build seems to crash parsing the CRS metadata from the Parquet file.

Possibly related

  • GeoArrow export #2187 (GeoArrow export — Unsupported type in DuckDB → Arrow Conversion: GEOMETRY) is a different issue about Arrow serialization. This bug crashes before any Arrow conversion happens.

Browser/Environment:

Firefox / Chrome (both)

Device:

MacBook Pro

DuckDB-Wasm Version:

1.33.1-dev40.0

DuckDB-Wasm Deployment:

Bundled (Vite + SvelteKit) — objex

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions