Skip to content

Add support for Categoricals as a data type in the writer #450

Closed
@mkleinbort-ic

Description

@mkleinbort-ic

Feature Request / Improvement

This code does not work:

import polars as pl
df = pl.DataFrame({'x':['Hi']}, schema={'x':pl.Categorical}).to_arrow()

# pyarrow.Table
# x: dictionary<values=large_string, indices=uint32, ordered=0>
# ----
# x: [  -- dictionary:
# ["Hi"]  -- indices:
# [0]]

table = catalog.create_table(
    "default.test_table_01",
    schema=df.schema,
)

With error

TypeError: Unsupported type: dictionary<values=large_string, indices=uint32, ordered=0>

I'd be good to support Categorical data types

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions