Hi Devs,

Another question about the string functions.

The example code on the 
http://asterixdb.ics.uci.edu/documentation/aql/functions.html#StringFunctions 
<http://asterixdb.ics.uci.edu/documentation/aql/functions.html#StringFunctions> 
shows that these two function are suppose to be called after contains(). I 
wonder what is the expected behavior if the they can't find the match pattern?

The current result is confusing. 

e.g. 
let $x := "substring"
return [ substring-before($x, "subx"), substring-after($x, “subx”)]

it will return 
[ [ "subst", "" ]
 ]
Should we always return an empty string in such case, or throw an exception 
like “you shall filter the result by contain() first” ? 
IMHO, I’d like to return a null string. Any opinion?


Best,

Jianfeng Jia
PhD Candidate of Computer Science
University of California, Irvine

Reply via email to