Skip to content

gfql cypher: WHERE on a single alias of a multi-alias MATCH is rejected as multi-source #2019

Description

@lmeyerov

Repro (master @ 3fb216d, both engines)

import pandas as pd, graphistry
nodes_df = pd.DataFrame({'id': ['a','b','c','tx1','tx2'],'type': ['person','person','company','transaction','transaction']})
edges_df = pd.DataFrame({'src': ['a','b','a','tx1','tx2'],'dst': ['b','c','tx1','tx2','c'],'e_type': ['knows','works_at','sent','transfer','received']})
g = graphistry.edges(edges_df,'src','dst').nodes(nodes_df,'id')
g.gfql("MATCH (a)-[e]->(t) WHERE a.type IN ['person','company'] RETURN t.id AS id")

Raises GFQLValidationError [unsupported-cypher-query] Cypher row lowering currently supports one MATCH source alias at a time on engine='pandas' and 'polars'.

The same pattern with predicates on two aliases works on both engines:

g.gfql("MATCH (a)-[e]->(t) WHERE a.type IN ['person','company'] AND e.e_type IN ['sent','transfer'] RETURN t.id AS id")  # -> ['tx1']

So a WHERE that touches fewer aliases than the pattern is lowered as a multi-source query. Expected: filter on a, project t. Found while adding tested Cypher twins to gfql/about.rst examples (#2017 follow-up).

🤖 Generated with Claude Code

https://claude.ai/code/session_01WwMmVFo44ADiRRj5cxh7i1

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions