incubator-vxquery-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Till Westmann (JIRA)" <>
Subject [jira] [Commented] (VXQUERY-34) Basic String Functions
Date Fri, 22 Jun 2012 06:45:42 GMT


Till Westmann commented on VXQUERY-34:

I've tried this example: fn:string-length("äöüß") and it returns 8 instead of 4. Unfortunately
I haven't been able to find the cause for this so far.

Regarding the implementation of fn:string-length I've also got 2 comments:
1) It still uses the TYPE_ID constants instead of the TAG constants.
2) It would be nice to have a symbolic constant for the '9', e.g. RES_SIZE = LongPointable.TYPE_TRAITS.getFixedLength()
+ 1;

For fn:substring I think that we should keep the possibility to directly consume integer arguments,
as this will we the most common case. We only need to insure, that the compiler won't always
introduce the promotion to double.

The handling of double arguments to fn:substring is not correct. Using intValue on the double
will truncate the value, while the specification says that it needs to be rounded (
I would propose to leave it as-is for now and to fix it using our implementation for fn:round
once that it available. If that's what we do, we should file a bug to ensure that we don't
forget it.
> Basic String Functions 
> -----------------------
>                 Key: VXQUERY-34
>                 URL:
>             Project: VXQuery
>          Issue Type: Sub-task
>            Reporter: Preston Carman
>              Labels: patch
>         Attachments: BasicStringFunctions2.patch, BasicStringFunctions3.patch, BasicStringFunctions4.patch
> The basic string functions to build help with basic queries.
> fn:concat - Concatenates two or more xs:anyAtomicType arguments cast to xs:string.
> fn:string-join - Returns the xs:string produced by concatenating a sequence of xs:strings
using an optional separator.
> fn:substring - Returns the xs:string located at a specified place within an argument
> fn:string-length - Returns the length of the argument.
> fn:upper-case - Returns the upper-cased value of the argument.
> fn:lower-case - Returns the lower-cased value of the argument.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message