Skip to content

Conversation

@sebjulliand
Copy link
Member

Description

Fixes #423

This PR fixes an issue making the Visual Explain treeview crash as described in #423.
The logic used to link nodes with each others was flawed as it did not use the child node information returned by Visual Explain. This could work as long as each node had one and only one parent. But if one or more nodes have multiple parents, it would crash.

With this PR, nodes are linked together using the children node ids returned by Visual Explain.

How to test

Run Explain (without running is fine) using a query producing a graph with nodes having multiple parents, like the one provided in #423:

WITH ip_addrs(rmt_addr, rmt_count)
   AS (SELECT remote_address, COUNT(*)
          FROM TABLE(qsys2.display_journal('QSYS', 'QAUDJRN',
             journal_entry_types => 'PW', starting_timestamp => CURRENT
             TIMESTAMP - 24 HOURS)) AS x
          GROUP BY remote_address)
   SELECT i.rmt_addr, i.rmt_count, user_name, rmt_port
      FROM ip_addrs i LEFT OUTER JOIN 
      qsys2.netstat_job_info n ON i.rmt_addr = remote_address 
union all     
   SELECT i.rmt_addr, i.rmt_count, user_name, rmt_port
      FROM ip_addrs i LEFT OUTER JOIN 
      qsys2.netstat_job_info n ON i.rmt_addr = remote_address 

union all     
   SELECT i.rmt_addr, i.rmt_count, user_name, rmt_port
      FROM ip_addrs i LEFT OUTER JOIN 
      qsys2.netstat_job_info n ON i.rmt_addr = remote_address 
image

Before the PR, the VE view would show the this.flatNodes[node.id] is not iterable error.
With the PR applied, the graph must be displayed correctly.
image

Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
@sebjulliand sebjulliand requested a review from a team January 19, 2026 16:05
@sebjulliand sebjulliand self-assigned this Jan 19, 2026
@sebjulliand sebjulliand added the bug Something isn't working label Jan 19, 2026
@github-actions
Copy link

👋 A new build is available for this PR based on 43dc4f6.

@sebjulliand sebjulliand mentioned this pull request Jan 19, 2026
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

this.flatNodes[node.id] is not iterable

2 participants