Skip to content

Fix DynFuncCall argument type check and StructFilter context setting - #2549

Merged
ChristianGruen merged 1 commit into
BaseXdb:mainfrom
GuntherRademacher:#2546
Nov 25, 2025
Merged

ChristianGruen merged 1 commit into
BaseXdb:mainfrom
GuntherRademacher:#2546

Conversation

@GuntherRademacher

Copy link
Copy Markdown
Member

#2546 was caused by the change made for #2530. While the change is doing the right thing, its check for the function being a map is insufficient. It checked for instanceof XQMap, but should have checked .seqType().type instanceof MapType, in order to also cover variables, as in the first offending query.

The other query (from #2547) calls for an additional fix. Its empty result is caused by MapCompilation analysing keyMismatch for a map type of map(xs:integer, xs:integer) and a key type of xs:string. However the relevant map type in this case would have been record(key as xs:anyAtomicType, value as item()*). The map type originates from the context setting established in AFilter.inline, and I have set it to null for the StructFilter case. Maybe there is a better solution for this one?

@ChristianGruen

Copy link
Copy Markdown
Member

Thanks. I will adopt your solution unchanged. The filter for structs may be optimized later on if it remains in the language.

@ChristianGruen
ChristianGruen merged commit bc747fe into BaseXdb:main Nov 25, 2025
1 check passed
@ChristianGruen
ChristianGruen deleted the #2546 branch November 25, 2025 15:27
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