You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Xikui Wang (JIRA)" <ji...@apache.org> on 2017/05/17 02:59:04 UTC

[jira] [Closed] (ASTERIXDB-1901) UDF fails at constant parameter

     [ https://issues.apache.org/jira/browse/ASTERIXDB-1901?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xikui Wang closed ASTERIXDB-1901.
---------------------------------
    Resolution: Fixed

> UDF fails at constant parameter
> -------------------------------
>
>                 Key: ASTERIXDB-1901
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1901
>             Project: Apache AsterixDB
>          Issue Type: Bug
>            Reporter: Xikui Wang
>            Assignee: Xikui Wang
>
> If the declared datatype for UDF input is a open type, UDF will fail when given constant record (which has a closed datatype implicitly)
> Execute following query with default lib installed can reproduce this issue:
> {noformat}
> drop dataverse externallibtest if exists;
> create dataverse externallibtest;
> use dataverse externallibtest;
> create type TextType if not exists as open {
>     id: int32,
>     text: string
> };
> /* This will fail */
> let $i:=testlib#toUpper({"id":1, "text":"lower text"})
> return $i
> /* This works */
> let $i:={"id":1, "text":"lower text"}
> return testlib#toUpper($i)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)