Looks like a too eager optimization. Did you have a chance to look at the resulting query plan?
Giuseppe Celano celano@informatik.uni-leipzig.de schrieb am Fr., 6. Juli 2018, 22:40:
I have noticed that in BaseX 9.0.2 a query like
<j>fgrtu</j>/data(.)/replace(., "g", "h")
gets evaluated (returning "fhrtu"), while in BaseX 8.x, Exist, and Zorba I get an error message (since, as expected, replace() is preceded not by a node but a string).
Is this a bug?
Ciao, Giuseppe