You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2019/10/07 16:30:00 UTC
[jira] [Commented] (ASTERIXDB-2634) Make string functions return
NULL on mismatch
[ https://issues.apache.org/jira/browse/ASTERIXDB-2634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16946009#comment-16946009 ]
ASF subversion and git services commented on ASTERIXDB-2634:
------------------------------------------------------------
Commit e54e4178fec325e8812f5f042c3cdba81ed49fb1 in asterixdb's branch refs/heads/master from Ali Alsuliman
[ https://gitbox.apache.org/repos/asf?p=asterixdb.git;h=e54e417 ]
[ASTERIXDB-2634][COMP] String functions return null on data/type errors
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
Functions changed:
substring(string, start_idx),
repeat(string, num_times),
string_join([string], string_separator),
replace(string, search_string, string_replacement, num_times),
regexp_replace(string, string_pattern, string_replacement, num_times)
Those functions (except string_join) can return NULL even if the
arguments types are valid since the argument values could be not
valid at runtime. Their type computer is always nullable.
- int argument can be double/float on the condition that its value
is integer
- clean-ups:
UnaryStringInt64TypeComputer & AbstractStringTypeComputer.
ExceptionUtil:
- changed signature of toExpectedTypeString(). Overloading
with varargs with Object made it confusing.
- changed some args to Supplier to allow code sharing.
- removed StringIntToStringTypeComputer since now the instances
are not being used by the above functions.
- reorganized/renamed test cases
Change-Id: Ia85a0d08888021ae439a1d9f2f5858bcd52c79f3
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/3605
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Ali Alsuliman <al...@gmail.com>
Reviewed-by: Michael Blow <mb...@apache.org>
> Make string functions return NULL on mismatch
> ---------------------------------------------
>
> Key: ASTERIXDB-2634
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-2634
> Project: Apache AsterixDB
> Issue Type: Task
> Components: COMP - Compiler, RT - Runtime
> Affects Versions: 0.9.4
> Reporter: Ali Alsuliman
> Assignee: Ali Alsuliman
> Priority: Major
> Fix For: 0.9.5
>
>
> Make string functions return NULL on a mismatch and issue a warning.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)