From issues-return-49312-archive-asf-public=cust-asf.ponee.io@drill.apache.org Tue Jan 30 19:26:05 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 2E68C18061A for ; Tue, 30 Jan 2018 19:26:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 1E4B1160C53; Tue, 30 Jan 2018 18:26:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 63B71160C2A for ; Tue, 30 Jan 2018 19:26:04 +0100 (CET) Received: (qmail 5064 invoked by uid 500); 30 Jan 2018 18:26:03 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 5055 invoked by uid 99); 30 Jan 2018 18:26:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jan 2018 18:26:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 17A82D4BD1 for ; Tue, 30 Jan 2018 18:26:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id A8jLeR_hnGLV for ; Tue, 30 Jan 2018 18:26:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id BCF4D5FAC4 for ; Tue, 30 Jan 2018 18:26:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 11815E00D2 for ; Tue, 30 Jan 2018 18:26:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id C7346240EE for ; Tue, 30 Jan 2018 18:26:00 +0000 (UTC) Date: Tue, 30 Jan 2018 18:26:00 +0000 (UTC) From: "Alexander Malashevsky (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-5919) Add non-numeric support for JSON processing MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DRILL-5919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16345564#comment-16345564 ] Alexander Malashevsky commented on DRILL-5919: ---------------------------------------------- *VERSION_VERIFIED:* 1.13.0-SNAPSHOT The functionality has been verified, the following verificatios were performed: - Verify that store.json.writer.allow_nan_inf/store.json.reader.allow_nan_inf are setup to true by default - *PASSED*; - Verify that NaN/Infinity/-Infinity values will be extracted properly from .json file if store.json.reader.allow_nan_inf = true - *PASSED*; - Verify that the corresponding error message will appear if to select NaN/Infinity/-Infinity values with store.json.reader.allow_nan_inf = false - *PASSED*; - Verify that NaN/Infinity/-Infinity values will be written as literals to a .json file when store.json.writer.allow_nan_inf = true - *PASSED*; - Verify that NaN/Infinity/-Infinity values will be written as string values to a .json file when store.json.writer.allow_nan_inf = false - *PASSED*; - Verify that NaN/Infinity/-Infinity values are processed properly in queries with UNION, UNION ALL, JOIN, ORDER BY, WHERE, GROUP BY etc. - 2 issues found -> DRILL-6121, DRILL-6122 - Verify convert_toJSON/convert_fromJSON functions - *PASSED*; - Verify that NaN/Infinity/-Infinity values will be processed properly by Math functions - 1 issue found -> DRILL-6120 > 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 > Priority: Major > Labels: doc-impacting, ready-to-commit > Fix For: 1.13.0 > > > 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.allow_nan_inf}} and {{store.json.writer.allow_nan_inf}} that allow to read/write NaN and Infinity as numbers. By default these options are set to true. > 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, but > select convert_fromJSON('{"key": NaN}', true) from (values(1)); will parse NaN as a number. > {noformat} > 3. Added unit tests, including tests for math functions. -- This message was sent by Atlassian JIRA (v7.6.3#76005)