I think a potentially broader issue relates to ANY functions in our library and heterogeneity (aka being passed the wrong input type). We probably need to look carefully at if/where/how each of our functions is protected - and what their semantics are (and/or should be :-)) - in the event of a wrong input type...!

On 8/14/15 9:14 AM, Wail Alkowaileet wrote:
Done. I wasn't sure if the JIRA was ready.

One more thing, can I cast ADM primitive to string ? as for example, I want
to output the result as "STRING INT32" in one concatenated field?

Thanks!

On Fri, Aug 14, 2015 at 11:52 AM, Ian Maxon <[email protected]> wrote:

Interesting. Mind creating an issue on JIRA about this? :
https://issues.apache.org/jira/browse/ASTERIXDB

I've had similar but not so easy to reproduce issues with string-concat
before, so the whole function certainly needs a second look.

Thanks,
- Ian


On Fri, Aug 14, 2015 at 8:45 AM, Wail Alkowaileet <[email protected]>
wrote:

Hello Team,

I was testing some of Asterix built-in functions and I ran into a bug if
the fields are heterogeneous.

Reproduce the Problem:
let $k := [{"a":1, "b":"hello"}, {"a":2, "b":{"k": [1,2,2]}}]
for $x in $k
where $x.a = 1
return string-concat([$x.b, " world"])

Result:
summary: "edu.uci.ics.hyracks.api.exceptions.HyracksDataException:
java.lang.ArrayIndexOutOfBoundsException: 64

if the 2nd "b" is string as well, the issue doesn't appear.


logs attached.
--

*Regards,*
Wail Alkowaileet




Reply via email to