Clone
Dmitry Lychagin <dmitry.lychagin@couchbase.com>
committed
on 31 Jan 18
[ASTERIXDB-2272][FUN] Count character positions from 0
- user model changes: yes
- storage format changes: no
- interface changes: no

Detai… Show more
[ASTERIXDB-2272][FUN] Count character positions from 0

- user model changes: yes

- storage format changes: no

- interface changes: no

Details:

- Count character positions in strings, binary from 0 instead of 1

- Affects following built-in functions:

 position(), regexp_position(), substr()/subtring(),

 sub_binary(), find-binary()

- Introduce new configuration property “compiler.stringoffset”

 for backward compatibility

 compiler.stringoffset = 0 - count from 0 (new default)

 compiler.stringoffset = 1 - count from 1 (backwards-compatible setting)

Change-Id: Icdb2c241983d5f592b2695ef16eae9951518d7fd

Reviewed-on: https://asterix-gerrit.ics.uci.edu/2342

Reviewed-by: Dmitry Lychagin <dmitry.lychagin@couchbase.com>

Tested-by: Dmitry Lychagin <dmitry.lychagin@couchbase.com>

Show less

master + 3 more