Skip to content

Add support for dictionary encoding #25

@ianmcook

Description

@ianmcook

Support for reading dictionary-encoded arrays is not yet implemented.

Simple example:

  1. Write file with Python:
import pyarrow as pa
from pyarrow import compute as pc

table = pa.Table.from_arrays(
  arrays=[pc.dictionary_encode(pa.array(["a", "b", "c"]))],
  names=["x"]
)

with pa.ipc.new_stream("dict.arrows", table.schema) as writer:
  writer.write_table(table)
  1. Try to read file with DuckDB:
INSTALL arrow FROM community;
LOAD arrow;

SELECT * FROM read_arrow('dict.arrows');
  1. See error:
IO Error:
ArrowIpcDecoderDecodeSchema(decoder.get(), base_schema.get(), &error) failed with errno 45: Schema message field with DictionaryEncoding not supported

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions