Skip to content

Require Arrow plugin exports to keep values, not only round-trip #11854

Open

Description

@connortsui20

Problem or motivation

Right now, the Arrow plugin contract (the ArrowSession docs) only requires a round trip: exporting an array to a field and importing it with the same field must preserve its dtype and logical values. This guarantees that an export loses no information, but it says nothing about what the exported Arrow data means to an Arrow consumer like DataFusion.

The DataFusion expression converter needs that second property, because a pushed-down expression runs on the Vortex array, while the same expression left in DataFusion runs on the exported Arrow array. Both must give the same answer.

For example, a plugin could export a Point with storage {x: 10, y: 11} as the Arrow struct {x: 11, y: 10} and swap the fields back on import. That round-trips, but get_field(point, 'x') returns 11 in DataFusion and 10 when Vortex evaluates it. The same goes for a plugin that changes byte order (equality still agrees, but ordering does not), or one that exports a null as a non-null sentinel value and turns it back into a null on import.

The converter already relies on this property without stating it. On develop, comparisons on extension columns such as UUID and JSON, and on such fields inside plain structs, are pushed down. #11639 avoids extending that assumption: when a get_field reads through extension storage, the read stays in DataFusion if a registered exporter handles the selected field (ArrowSession::exports_without_plugins). This means that the same UUID field is pushed down under a plain struct, but not under an extension struct without plugins.

Note that this issue is only about values. A plugin on the extension that get_field reads into can legitimately change the storage layout (UUID storage is FixedSizeList<u8, 16>, but it exports as FixedSizeBinary(16)), so the field paths no longer match. ArrowSession::exports_extension_storage handles that case, and it stays whatever this issue decides.

Proposed solution

Ideally, the contract on ArrowExportVTable states that the exported Arrow array holds the same logical values as the Vortex array: the same validity at every level, and the same result for every operation that a converter pushes down (at least equality and ordering). A conformance check in the Arrow test harness can then compare the exported values of each plugin against the Vortex values. Once this lands, the exports_without_plugins check in convert_get_field and its TODO can go.

Of course, a plugin that breaks this rule gives wrong query results instead of an error, since the property can't be checked cheaply at runtime. The conformance check is the answer to that, but it only covers the plugins that run it.

Additional context

Alternatives:

  1. An opt-in method on ArrowExportVTable that says whether the exports of a plugin keep values, defaulting to false. The converter then pushes down only through plugins that opt in. This is explicit, but it adds API surface, and every existing plugin needs an audit anyway.
  2. No contract, and a conservative converter everywhere. This also keeps comparisons on plugin-exported columns in DataFusion, which gives up filter pushdown for UUID and JSON columns.

Open question: does the arrow.parquet.variant exporter keep values? Two equal variants can have different binary encodings, so it is the first plugin to audit.

Activity

  1. added
    feature
    on Nov 23, 2026
  2. robert3005 commented on Nov 23, 2026

    @robert3005
    Contributor

    I am not quite sure what else you could do. It seems very hard to do something where the values are different?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions