[jira] [Commented] (ASTERIXDB-2458) Compilation exception when if_null(), if_missing(), if_missing_or_null() are provided with certain kinds of arguments

2019-06-12 Thread Ali Alsuliman (JIRA)


[ 
https://issues.apache.org/jira/browse/ASTERIXDB-2458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16862212#comment-16862212
 ] 

Ali Alsuliman commented on ASTERIXDB-2458:
--

above comment is by mistake. it should've made it to ASTERIXDB-2574

> Compilation exception when if_null(), if_missing(), if_missing_or_null() are 
> provided with certain kinds of arguments
> -
>
> Key: ASTERIXDB-2458
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-2458
> Project: Apache AsterixDB
>  Issue Type: Bug
>  Components: FUN - Functions
>Affects Versions: 0.9.3
>Reporter: Ali Alsuliman
>Assignee: Ali Alsuliman
>Priority: Major
> Fix For: 0.9.4.2
>
>
> if_null(), if_missing(), if_missing_or_null() would throw compilation 
> exception for certain kinds of arguments. One example is if_null(int, 
> record). The cause is related to trying to cast the arguments to the type 
> that the function wants to return.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ASTERIXDB-2458) Compilation exception when if_null(), if_missing(), if_missing_or_null() are provided with certain kinds of arguments

2019-06-11 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/ASTERIXDB-2458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16861565#comment-16861565
 ] 

ASF subversion and git services commented on ASTERIXDB-2458:


Commit 01423da8a2c006706a89e21e852799eae33d35ef in asterixdb's branch 
refs/heads/master from Ali Alsuliman
[ https://gitbox.apache.org/repos/asf?p=asterixdb.git;h=01423da ]

[ASTERIXDB-2458][COMP] Fix min/max functions with group by

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
In a sort-group-by operator, an aggregate function has a merging
aggregate function that will be used when merging the run files
if they were generated. The merging aggregate function of the local
min/max aggregate function should be different from the merging
aggregate function of the global min/max. For local min/max, the
merging aggregate function should propagate system_null if the
aggregation is system_null. Also, the global min/max should handle
finishPartial() different from finish(). finishPartial()
should not output NULL if the aggregation is system_null since the
aggregation is still going on.

- added functions to be intermediate steps for local aggregation.
- implemented logic for finishPartial()
- added test cases for strict_min/max with group by

Change-Id: Ie0551b091b9adbbbd51158dbd36124a7184bdce0
Reviewed-on: https://asterix-gerrit.ics.uci.edu/3434
Contrib: Jenkins 
Sonar-Qube: Jenkins 
Tested-by: Jenkins 
Integration-Tests: Jenkins 
Reviewed-by: Ali Alsuliman 
Reviewed-by: Dmitry Lychagin 


> Compilation exception when if_null(), if_missing(), if_missing_or_null() are 
> provided with certain kinds of arguments
> -
>
> Key: ASTERIXDB-2458
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-2458
> Project: Apache AsterixDB
>  Issue Type: Bug
>  Components: FUN - Functions
>Affects Versions: 0.9.3
>Reporter: Ali Alsuliman
>Assignee: Ali Alsuliman
>Priority: Major
> Fix For: 0.9.4.2
>
>
> if_null(), if_missing(), if_missing_or_null() would throw compilation 
> exception for certain kinds of arguments. One example is if_null(int, 
> record). The cause is related to trying to cast the arguments to the type 
> that the function wants to return.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ASTERIXDB-2458) Compilation exception when if_null(), if_missing(), if_missing_or_null() are provided with certain kinds of arguments

2019-05-24 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/ASTERIXDB-2458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16847947#comment-16847947
 ] 

ASF subversion and git services commented on ASTERIXDB-2458:


Commit 1a565f89959ba281dc0dfd8c9664fc5a373f09ad in asterixdb's branch 
refs/heads/master from Ali Alsuliman
[ https://gitbox.apache.org/repos/asf?p=asterixdb.git;h=1a565f8 ]

[ASTERIXDB-2458][COMP] Fix InjectTypeCastForFunctionArgumentsRule

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
InjectTypeCastForFunctionArgumentsRule is for functions that
can potentially return any of their arguments. switch and
if_null(expr1, expr2, ...) are examples. All the arguments
need to be casted (opened) to the type that the function
will return which is the generalized type of all arguments.
Some functions like if_null can determine the exact expression
they will return, e.g. if_null(1, {"id": 3}) in which case
the return type is always integer. The rule tries to cast
th 2nd argument, the record, to integer and fails. In such
cases, these functions do not need to cast their arguments.
If the function determines its output type to be ANY, then
all arguments need to be casted (opened). If the function
determines its output to be a dervied type, then casting is
also needed since that output type should be the generalized
type of all arguments.

Change-Id: I2fee234d883b59319e4ec4df58d61ecd498373fd
Reviewed-on: https://asterix-gerrit.ics.uci.edu/3406
Contrib: Jenkins 
Sonar-Qube: Jenkins 
Tested-by: Jenkins 
Integration-Tests: Jenkins 
Reviewed-by: Dmitry Lychagin 


> Compilation exception when if_null(), if_missing(), if_missing_or_null() are 
> provided with certain kinds of arguments
> -
>
> Key: ASTERIXDB-2458
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-2458
> Project: Apache AsterixDB
>  Issue Type: Bug
>  Components: FUN - Functions
>Affects Versions: 0.9.3
>Reporter: Ali Alsuliman
>Assignee: Ali Alsuliman
>Priority: Major
> Fix For: 0.9.4.2
>
>
> if_null(), if_missing(), if_missing_or_null() would throw compilation 
> exception for certain kinds of arguments. One example is if_null(int, 
> record). The cause is related to trying to cast the arguments to the type 
> that the function wants to return.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)