You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Volodymyr Tkach (JIRA)" <ji...@apache.org> on 2017/11/07 14:37:00 UTC

[jira] [Comment Edited] (DRILL-5919) Add non-numeric support for JSON processing

    [ https://issues.apache.org/jira/browse/DRILL-5919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16242040#comment-16242040 ] 

Volodymyr Tkach edited comment on DRILL-5919 at 11/7/17 2:36 PM:
-----------------------------------------------------------------

1. Added two session options `store.json.reader.non_numeric_numbers` and `store.json.reader.non_numeric_numbers` that allow to read/write `NaN` and `Infinity` as numbers. By default these options are set to false;
2. Extended signature of `convert_toJSON` and `convert_fromJSON` functions by adding second optional parameter that enables read/write `NaN` and `Infinity`. For example:
`select convert_fromJSON('\{"key": NaN\}') from (values(1));` will result with JsonParseException, but 
`select convert_fromJSON('\{"key": NaN\}', true) from (values(1));` will parse `NaN` as a number.


was (Author: volodymyr.tkach):
Added two session options `store.json.reader.non_numeric_numbers` and `store.json.reader.non_numeric_numbers` that allow to read/write `NaN` and `Infinity` as numbers. By default these options are set to false;
Also extended signature of `convert_toJSON` and `convert_fromJSON` functions by adding second optional parameter that enables read/write `NaN` and `Infinity`. For example:
`select convert_fromJSON('\{"key": NaN\}') from (values(1));` will result with JsonParseException, but 
`select convert_fromJSON('\{"key": NaN\}', true) from (values(1));` will parse `NaN` as a number.

> Add non-numeric support for JSON processing
> -------------------------------------------
>
>                 Key: DRILL-5919
>                 URL: https://issues.apache.org/jira/browse/DRILL-5919
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Storage - JSON
>    Affects Versions: 1.11.0
>            Reporter: Volodymyr Tkach
>            Assignee: Volodymyr Tkach
>             Fix For: Future
>
>
> Add session options to allow drill working with non standard json strings number literals like: NaN, Infinity, -Infinity. By default these options will be switched off, the user will be able to toggle them during working session.



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