rumble icon indicating copy to clipboard operation
rumble copied to clipboard

Quantified expression no extraction of effective boolean value

Open mario-arduini opened this issue 5 years ago • 1 comments

in quantified expressions, queries like

some $a in (1,2,"a") satisfies $a throws An error has occurred: org.rumbledb.items.IntItem cannot be cast to org.rumbledb.items.BooleanItem

it seems they cannot produce the effective boolean value of the test condition

mario-arduini avatar Oct 29 '20 14:10 mario-arduini

Suggestion: convert quantified expression to FLWOR runtime iterators to make it future proof and avoid writing the same code twice

some $a in (1,2,"a") satisfies $a

becomes

exists(for $a in (1, 2, "a") where $a return 0)

and

every $a in (1,2,"a") satisfies $a

empty(for $a in (1, 2, "a") where not $a return 0)

ghislainfourny avatar Nov 09 '20 10:11 ghislainfourny