Skip to content

Inspect base items of large sequences when checking nondeterminism#2726

Closed
GuntherRademacher wants to merge 1 commit into
BaseXdb:mainfrom
GuntherRademacher:ndt-check
Closed

Inspect base items of large sequences when checking nondeterminism#2726
GuntherRademacher wants to merge 1 commit into
BaseXdb:mainfrom
GuntherRademacher:ndt-check

Conversation

@GuntherRademacher

Copy link
Copy Markdown
Member

This is a follow-up to the recent atomic-type check in DynFuncCall.containsNdtFunction, which still walked every item of large non-atomic sequences and arrays, e.g.

array { (1 to 100_000_000_000) ! identity#1 }(1)

The check now inspects the compact base items instead: a new Value.baseItems() (overridden in SingletonSeq and SubSeq) collapses fn:replicate sequences, and arrays are inspected via an ItemArray's backing or a multi-member array's members (never flattened).

Regression tests have been added to NonDeterministicTest.

ChristianGruen added a commit that referenced this pull request Jul 22, 2026
@ChristianGruen

Copy link
Copy Markdown
Member

I have chosen a slightly different fix.

@ChristianGruen
ChristianGruen deleted the ndt-check branch July 22, 2026 15:36
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