Skip to content

Writing an empty table with a top-level struct column panics: "must have visited at least one chunk" #8347

@joseph-isaacs

Description

@joseph-isaacs

Found by the Python API Hypothesis fuzzer (vortex-python/test/test_fuzz_file_roundtrip.py).

Writing a zero-row table that contains a top-level struct column panics in vortex-layout/src/layouts/collect.rs (latest_sequence_id.vortex_expect("must have visited at least one chunk")), which surfaces in Python as pyo3_runtime.PanicException: Runtime dropped task without completing it, likely it panicked.

import os
import tempfile

import pyarrow as pa
import vortex as vx

t = pa.table({"c0": pa.array([], type=pa.struct([("a", pa.int32())]))})
with tempfile.TemporaryDirectory() as d:
    vx.io.write(t, os.path.join(d, "x.vortex"))  # panics

Zero-row tables without struct columns write fine. The fuzzer currently assume()s away empty tables with struct columns; that guard can be removed once this is fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions