Skip to content

Fix numeric operator operand context isolation#124

Merged
zhengchun merged 1 commit into
antchfx:masterfrom
3leapsdave:fix/numeric-operand-context
Jul 17, 2026
Merged

Fix numeric operator operand context isolation#124
zhengchun merged 1 commit into
antchfx:masterfrom
3leapsdave:fix/numeric-operand-context

Conversation

@3leapsdave

Copy link
Copy Markdown
Contributor

Predicate evaluation on a left-hand numeric operand can leave the shared navigator
on a different node before the right-hand operand is evaluated. Context-sensitive
RHS expressions (for example count(self::Name)) then observe the wrong context.

This change isolates operand evaluation context in numericQuery.Evaluate (snapshot
context, eager asNumber per operand, restore) and adds regression tests for the
predicated-sum × context-sensitive-factor class, with literal-factor and factor-first
controls.

Predicate evaluation on a left-hand numeric operand can leave the shared
navigator on a different node before the right-hand operand runs. Snapshot
and restore the operator context around each operand, with eager number
coercion, and add regression tests.
@zhengchun
zhengchun merged commit 3baa0aa into antchfx:master Jul 17, 2026
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.

2 participants