Skip to content

AST row select cannot reference edge alias properties after traversal #982

Description

@lmeyerov

Summary

On the AST/GFQL path, row projection can reference node aliases like friend.firstName, but it currently fails when projecting an edge alias property such as r.creationDate after a traversal.

Status

Partially fixed in v0.53.9 (PR #986).

The Cypher string path now works:

g.gfql("MATCH (a)-[r:KNOWS]->(b) RETURN a.id, r.creationDate AS cd, b.firstName")
# → [{'a.id': 'a', 'cd': 123, 'b.firstName': 'Bob'}]

The native AST path (rows() + select()) is still broken:

g.gfql([n(name='n'), e_undirected(name='r'), n(name='friend'), rows(),
        select([('cd', 'r.creationDate')])])
# → unsupported token in row expression: 'r'

The Cypher fix works via a bindings table that joins edges with node properties. The AST rows() path doesn't go through the same bindings table construction — it would need rows(alias_endpoints=...) to be wired into the native chain execution, not just the Cypher lowering.

Minimal repro (AST path — still failing)

import pandas as pd
from graphistry.tests.test_compute import CGFull
from graphistry.compute.ast import n, e_undirected, rows, select

g = CGFull().nodes(
    pd.DataFrame({
        'id': ['a', 'b'],
        'label__Person': [True, True],
        'firstName': ['Alice', 'Bob'],
        'lastName': ['A', 'B'],
    }),
    'id',
).edges(
    pd.DataFrame({
        's': ['a'],
        'd': ['b'],
        'type': ['KNOWS'],
        'creationDate': [123],
    }),
    's',
    'd',
)

steps = [
    n({'id': 'a', 'label__Person': True}, name='n'),
    e_undirected({'type': 'KNOWS'}, name='r'),
    n({'label__Person': True}, name='friend'),
    rows(),
    select([
        ('personId', 'friend.id'),
        ('firstName', 'friend.firstName'),
        ('friendshipCreationDate', 'r.creationDate'),
    ]),
]

print(g.gfql(steps)._nodes)

Observed behavior

GFQLTypeError [invalid-node-reference] Error executing 'select': unsupported token in row expression: 'r'

Expected behavior

[{'personId': 'b', 'firstName': 'Bob', 'friendshipCreationDate': 123}]

Likely relation

Depends on wiring rows(alias_endpoints=...) into the native AST chain execution path, not just the Cypher lowering path.

Activity

  1. added a commit that references this issue on Apr 1, 2026
  2. added and removed on Apr 1, 2026
  3. lmeyerov commented on Apr 1, 2026

    @lmeyerov
    ContributorAuthor

    Benchmark update from pyg-bench on 2026-04-01 after correcting the staged SNB graph identity bug on our side.

    Current measured IS3 / interactive-short-3 state on the corrected harness:

    • backend: GFQL
    • status: partial
    • issue ref: #982
    • expected rows: 920
    • actual rows: 920
    • no row diff in the current artifact
    • latest artifact: results/runs/dgx-spark-snb-interactive-core-sf1-v05315-r2/

    Important correction:

    • this is not a new residual wrong-answer bug
    • after the harness fix, the remaining benchmark-side IS3 limitation is that we still need the adapter two-pass workaround to project r.creationDate alongside the friend node columns
    • the current probe note is:
      • Semantic scope: adapter_two_pass_workaround.
      • Adapter workaround: fetch friend-node rows and matched KNOWS-edge rows separately, then join locally.

    So from the benchmark side, #982 is now the top active GFQL issue to clear on the short-query floor.

  4. added 2 commits that reference this issue on Apr 1, 2026
  5. added and removed on Apr 1, 2026
  6. lmeyerov commented on Apr 1, 2026

    @lmeyerov
    ContributorAuthor

    Benchmark follow-up from pyg-bench on 2026-04-01.

    The benchmark-side signal now agrees with the local repro note and PR #1015: #982 looks fixed on current origin/master and no longer looks like the next runtime feature ask.

    What changed on our side:

    • earlier we elevated #982 because the corrected v0.53.15 floor still showed IS3 on GFQL as a workaround-backed partial
    • after re-checking the current evidence plus your verification branch, the practical next step here is to land the regression coverage and close the issue, not do more runtime work on it

    The current active benchmark-side GFQL ask is back to #880.

  7. added a commit that references this issue on Apr 1, 2026
  8. added a commit that references this issue on Apr 1, 2026
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions