You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/10/12 04:04:00 UTC
[jira] [Commented] (TRAFODION-2772) retrieve a value from Json
string got an error: Json value is invalid
[ https://issues.apache.org/jira/browse/TRAFODION-2772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16201408#comment-16201408 ]
ASF GitHub Bot commented on TRAFODION-2772:
-------------------------------------------
GitHub user andyyangcn opened a pull request:
https://github.com/apache/incubator-trafodion/pull/1264
[TRAFODION-2772] - retrieve a value from Json string got an error: Json value is invalid
[TRAFODION-2772] - retrieve a value from Json string got an error: Json value is invalid
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/andyyangcn/incubator-trafodion fix2
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-trafodion/pull/1264.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1264
----
commit 5e334d6b321859faaf00cee29c94b1fcbb9f8e03
Author: Andy Yang <yo...@esgyn.cn>
Date: 2017-10-12T03:49:21Z
[TRAFODION-2772] - retrieve a value from Json string got an error: Json value is invalid
commit 5d9938015bbe86053ee034bc93033e7d40f05208
Author: Andy Yang <yo...@esgyn.cn>
Date: 2017-10-12T03:59:59Z
[TRAFODION-2772] - retrieve a value from Json string got an error: Json value is invalid - add NULL check
----
> retrieve a value from Json string got an error: Json value is invalid
> ---------------------------------------------------------------------
>
> Key: TRAFODION-2772
> URL: https://issues.apache.org/jira/browse/TRAFODION-2772
> Project: Apache Trafodion
> Issue Type: Bug
> Reporter: Yang, Yongfeng
> Assignee: Yang, Yongfeng
>
> >>create table json(str varchar(200));
> >>select json_object_field_text('{"f2":1}', 'f2') from json;
> *** ERROR[8971] JSON value is invalid.
> --- 0 row(s) selected.
> >>
> the expected result should like below.
> >>select json_object_field_text('{"f2":1}', 'f2') from (values(1)) T;
> (EXPR)
> --------
> 1
> --- 1 row(s) selected.
> >>
> >>select json_object_field_text('{"f2":1}', 'f2') from (values(1)) T;
> (EXPR)
> --------
> 1
> --- 1 row(s) selected.
> >>
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)