kz930 opened a new pull request, #7327: URL: https://github.com/apache/texera/pull/7327
### What changes were proposed in this pull request? Network Graph built its node set with `set(sources + destinations)`. On two pandas Series `+` is element-wise, so the set held each source glued to its destination rather than the union of the two columns; those glued values were added to the graph as nodes, and the genuine nodes only arrived afterwards with the edges. This takes the union instead, in first-appearance order, and seeds `spring_layout` so a given graph lays out the same way on every run. The order matters: a `set` iterates strings in an order that varies between processes, which would leave the node sequence — and so the figure — unstable even with the layout seeded. ### Why are the changes needed? Every rendered graph carried one unconnected dot per distinct source-destination pair, labelled with the glued name and reporting zero connections, with nothing to mark it as an artefact. Over the edges `n3→n4`, `n1→n2` and `n2→n3` the chart drew seven nodes instead of four, the extras being `n3n4`, `n2n3` and `n1n2` — and `n2n3` sat in the same picture as the genuine edge from `n2` to `n3`. When the two selected columns had different types the addition was invalid outright and the run aborted with `TypeError: unsupported operand type(s) for +: 'int' and 'str'`; both fields are node labels, so neither constrains its column type and the form offers every column. Separately, `spring_layout` was called with a `k` and an iteration count but no seed, so coordinates were redrawn at random on every run and the same input never produced the same picture twice. Running the operator's generated module over the same ten rows now yields four nodes with the right connection counts, no isolated dots, and identical coordinates across two runs. ### Does this PR introduce any user-facing change? Yes. Graphs no longer show the phantom nodes, a mixed-type pair of columns no longer aborts the run, and node positions become stable — an existing workflow renders one last different layout and stays put from then on. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
