drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Volodymyr Vysotskyi (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DRILL-5756) CONVERT_FROM_JSON on a non-existent column throws NullPointerException
Date Thu, 31 Aug 2017 14:56:00 GMT

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

Volodymyr Vysotskyi updated DRILL-5756:
---------------------------------------
    Description: 
Query
{code:sql}
SELECT CONVERT_FROM(columns[1], 'JSON') as col1 FROM dfs.`file1.tbl`;
{code}
where file1.tbl is a file with single column (it has only columns\[0\]) returns error
{noformat}
Error: SYSTEM ERROR: NullPointerException

Fragment 0:0

[Error Id: 85b7fa7f-2049-4c8b-8c96-805af218f118 on node1:31010] (state=,code=0)
{noformat}
It should return single row with null value since CONVERT_FROM is executed on the column that
does not exists.

*Problem description*
convert_fromJSON function considers only non-nullable VarCharHolder, but for this case, we
receive NullableVarCharHolder which has a null value. So convert_fromJSON function that takes
NullableVarCharHolder as an input parameter should be added.

{noformat}
cat file1.tbl
"{a:1}"
{noformat}

  was:
Query
{code:sql}
SELECT CONVERT_FROM(columns[1], 'JSON') as col1 FROM dfs.`file1.tbl`;
{code}
where file1.tbl is a file with single column (it has only columns\[0\]) returns error
{noformat}
Error: SYSTEM ERROR: NullPointerException

Fragment 0:0

[Error Id: 85b7fa7f-2049-4c8b-8c96-805af218f118 on node1:31010] (state=,code=0)
{noformat}
It should return single row with null value since CONVERT_FROM is executed on the column that
does not exists.

*Problem description*
convert_fromJSON function considers only non-nullable VarCharHolder, but for this case, we
receive NullableVarCharHolder which has null value. So convert_fromJSON function that takes
NullableVarCharHolder as an input parameter should be added.

{noformat}
cat file1.tbl
"{a:1}"
{noformat}


> CONVERT_FROM_JSON on a non-existent column throws NullPointerException
> ----------------------------------------------------------------------
>
>                 Key: DRILL-5756
>                 URL: https://issues.apache.org/jira/browse/DRILL-5756
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - JSON
>            Reporter: Volodymyr Vysotskyi
>
> Query
> {code:sql}
> SELECT CONVERT_FROM(columns[1], 'JSON') as col1 FROM dfs.`file1.tbl`;
> {code}
> where file1.tbl is a file with single column (it has only columns\[0\]) returns error
> {noformat}
> Error: SYSTEM ERROR: NullPointerException
> Fragment 0:0
> [Error Id: 85b7fa7f-2049-4c8b-8c96-805af218f118 on node1:31010] (state=,code=0)
> {noformat}
> It should return single row with null value since CONVERT_FROM is executed on the column
that does not exists.
> *Problem description*
> convert_fromJSON function considers only non-nullable VarCharHolder, but for this case,
we receive NullableVarCharHolder which has a null value. So convert_fromJSON function that
takes NullableVarCharHolder as an input parameter should be added.
> {noformat}
> cat file1.tbl
> "{a:1}"
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message