Skip to content

query: use actual table id for IsA matches in fixed traversal#4

Merged
60k41p merged 1 commit intomasterfrom
fix-is-a-eval
Mar 24, 2026
Merged

query: use actual table id for IsA matches in fixed traversal#4
60k41p merged 1 commit intomasterfrom
fix-is-a-eval

Conversation

@60k41p
Copy link
Copy Markdown

@60k41p 60k41p commented Mar 24, 2026

query: use actual table id for IsA matches in fixed traversal

Updates flecs_query_trav_fixed_src_up_fixed_second to use the actual component ID stored in the table's type array when a match is found for an EcsIsA relationship, rather than reconstructing the pair from arguments.

Changes:

  • Capture the column index returned by ecs_search_relation.
  • Add a check for column != -1 to ensure the relationship was found in the table (Self) before accessing the type array.
  • When trav == EcsIsA, set the matched ID to table->type.array[column].
  • Manually populate the iterator fields and variables with the resolved matched ID.

This ensures that the query iterator reports the exact component ID present in the archetype when matching IsA relationships.

@60k41p 60k41p merged commit cbf4505 into master Mar 24, 2026
69 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant