Skip to content

Fix handling of node numbers in queries with multiple alternatives#338

Open
matthias-stemmler wants to merge 1 commit into
korpling:mainfrom
matthias-stemmler:bugfix/node-numbers-multiple-alternatives
Open

Fix handling of node numbers in queries with multiple alternatives#338
matthias-stemmler wants to merge 1 commit into
korpling:mainfrom
matthias-stemmler:bugfix/node-numbers-multiple-alternatives

Conversation

@matthias-stemmler

Copy link
Copy Markdown
Contributor

I stumbled upon a bug in the way node numbers are counted in queries with multiple alternatives: In some cases indices local to the current conjunction are compared against global indices. I first noticed it when an unbound variable occurs in an alternative other than the first one. When searching through the module, I found two more instances of this issue.

For the fix, I subtract self.var_idx_offset to convert global to local indices. I turned get_cost_estimates and should_switch_operand_order into methods so they have access to this offset.

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