drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-5919) Add non-numeric support for JSON processing
Date Mon, 13 Nov 2017 10:36:00 GMT

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

ASF GitHub Bot commented on DRILL-5919:

Github user vladimirtkach commented on a diff in the pull request:

    --- Diff: exec/java-exec/src/main/resources/drill-module.conf ---
    @@ -502,6 +502,8 @@ drill.exec.options: {
         store.format: "parquet",
         store.hive.optimize_scan_with_native_readers: false,
         store.json.all_text_mode: false,
    +    store.json.writer.non_numeric_numbers: false,
    +    store.json.reader.non_numeric_numbers: false,
    --- End diff --
    No, we don't and we should test them. I think we have to create separate jira for testing
math functions, because code changes from this PR doesn't affect logic of any math function,
and while testing math function there will be other issues not connected with with functionality
(like BigInteger constructor doesn't accept NaN, Infinity and others)

> 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
>              Labels: doc-impacting
>             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.
> *For documentation*
> 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
> 2. Extended signature of {{convert_toJSON}} and {{convert_fromJSON}} functions by adding
second optional parameter that enables read/write NaN and Infinity.
> For example:
> {noformat}
> select convert_fromJSON('{"key": NaN}') from (values(1)); will result with JsonParseException,
> select convert_fromJSON('{"key": NaN}', true) from (values(1)); will parse NaN as a number.
> {noformat}

This message was sent by Atlassian JIRA

View raw message