Skip to content

Error when a parquet partition key contains numbers and alphabetics characters #9763

@nbc

Description

@nbc

What happens?

When a parquet partition key mixes numbers and alphabetic characters, duckdb fails on reading with error :

Error: Invalid Input Error: Unable to cast 'a' (from hive partition column 'KEY') to: 'BIGINT'

To Reproduce

CREATE TABLE tbl(key VARCHAR, name VARCHAR);
INSERT INTO tbl VALUES ('a', 'Mark'), ('1', 'Hannes');
COPY (SELECT * FROM tbl) TO 'ds_pqt' (FORMAT PARQUET, PARTITION_BY (key));
SELECT * FROM 'ds_pqt/**/*.parquet';

OS:

linux

DuckDB Version:

0.9.2 and bleeding edge

DuckDB Client:

cli

Full Name:

Nicolas Chuche

Affiliation:

MTES : https://github.com/MTES-MCT/

Have you tried this on the latest main branch?

I have tested with a main build

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

  • Yes, I have

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions