Skip to content

GFQL Polars OPTIONAL MATCH projection calls pandas-only dropna #1723

Description

@lmeyerov

Summary

On pygraphistry ebff2e1, a Polars Cypher OPTIONAL MATCH path reaches pandas-only DataFrame operations and raises AttributeError instead of running natively or raising a clear static NotImplementedError.

Reproduction shape

A query with a required match followed by an OPTIONAL MATCH that seeds its first alias from joined rows, such as the LDBC IS7 message-replies shape, fails on engine=polars with:

AttributeError: DataFrame object has no attribute dropna

The likely site is graphistry/compute/gfql_unified.py in _optional_arm_start_nodes, where joined_rows[[joined_col]].dropna().drop_duplicates().rename(columns=...) assumes pandas APIs.

The same query path is correct on pandas. This is related to native Polars row materialization work in #1709 but occurs specifically at optional-arm seed projection.

Impact

Polars Cypher conformance cannot safely claim this OPTIONAL MATCH shape. The current deep AttributeError is also not an acceptable unsupported-engine surface.

Acceptance criteria

  • Optional-arm seed extraction uses engine-polymorphic frame operations and preserves pandas/Polars row parity.
  • Add a focused Polars OPTIONAL MATCH regression with a shared alias and nullable optional arm.
  • If native support remains incomplete, reject statically with an actionable NotImplementedError rather than a pandas-method AttributeError.
  • Do not bridge Polars through pandas.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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