Skip to content

Support for map and list column types in parquet files #14

@jpxd

Description

@jpxd

When opening a parquet file with a column with a map type TableTool prints only "Unhandled type DatabaseType.map". It would be great if the contents of the field could be displayed e.g. as JSON. The same goes for lists with the error "Unhandled type DatabaseType.list".

Funnily there is map and list support when using SQL (since you use DuckDB internally I guess), just not when displaying the data.

Displaying map and list columns works in other tools like e.g. DuckDB or in Tad (https://www.tadviewer.com).

Thanks for the cool tool! 😄

DuckDB queries to create an example file:

-- Create the table with an index and a map column
CREATE TABLE example AS
SELECT
    1 AS idx,
    MAP(['a','b'], [10, 20]) AS m
UNION ALL
SELECT
    2 AS idx,
    MAP(['x','y','z'], [100, 200, 300]) AS m
UNION ALL
SELECT
    3 AS idx,
    MAP(['k'], [999]) AS m;

-- Write the table to a parquet file
COPY (SELECT * FROM example) TO 'example.parquet' (FORMAT 'parquet');

See the screenshots :
Image
Image

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