Return-Path: X-Original-To: apmail-drill-issues-archive@minotaur.apache.org Delivered-To: apmail-drill-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C57D017876 for ; Tue, 3 Feb 2015 20:15:35 +0000 (UTC) Received: (qmail 18542 invoked by uid 500); 3 Feb 2015 20:15:36 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 18505 invoked by uid 500); 3 Feb 2015 20:15:36 -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 18493 invoked by uid 99); 3 Feb 2015 20:15:36 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Feb 2015 20:15:36 +0000 Date: Tue, 3 Feb 2015 20:15:36 +0000 (UTC) From: "Jacques Nadeau (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-1953) alter session set `store.json.all_text_mode` does not work as documented 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-1953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Nadeau updated DRILL-1953: ---------------------------------- Component/s: Storage - JSON > alter session set `store.json.all_text_mode` does not work as documented > ------------------------------------------------------------------------ > > Key: DRILL-1953 > URL: https://issues.apache.org/jira/browse/DRILL-1953 > Project: Apache Drill > Issue Type: Bug > Components: Storage - JSON > Affects Versions: 0.8.0 > Reporter: Victoria Markman > > {code} > 0: jdbc:drill:schema=dfs> select * from `big_numeric.json`; > Query failed: Query stopped., Numeric value (14994882832830675451) out of range of long (-9223372036854775808 - 9223372036854775807) > at [Source: org.apache.drill.exec.vector.complex.fn.JsonReader@44ccf380; line: 0, column: 29] [ 56abe952-c902-41ac-b23b-8f44929a7ddf on atsqa4-134.qa.lab:31010 ] > Error: exception while executing query: Failure while executing query. (state=,code=0) > 0: jdbc:drill:schema=dfs> alter session set `store.json.all_text_mode`= true; > +------------+------------+ > | ok | summary | > +------------+------------+ > | true | store.json.all_text_mode updated. | > +------------+------------+ > 1 row selected (0.04 seconds) > 0: jdbc:drill:schema=dfs> select * from sys.options where name like '%all_text_mode%'; > +------------+------------+------------+------------+------------+------------+------------+ > | name | kind | type | num_val | string_val | bool_val | float_val | > +------------+------------+------------+------------+------------+------------+------------+ > | store.mongo.all_text_mode | BOOLEAN | SYSTEM | null | null | false | null | > | store.json.all_text_mode | BOOLEAN | SYSTEM | null | null | false | null | > | store.json.all_text_mode | BOOLEAN | SESSION | null | null | true | null | > +------------+------------+------------+------------+------------+------------+------------+ > 3 rows selected (0.14 seconds) > 0: jdbc:drill:schema=dfs> select * from `big_numeric.json`; > Query failed: Query stopped., Numeric value (14994882832830675451) out of range of long (-9223372036854775808 - 9223372036854775807) > at [Source: org.apache.drill.exec.vector.complex.fn.JsonReader@62c6c127; line: 0, column: 29] [ 147edaa9-3969-433c-895a-636d99df108f on atsqa4-134.qa.lab:31010 ] > Error: exception while executing query: Failure while executing query. (state=,code=0) > {code} > When I set this parameter on a SYSTEM level, it seems to work correctly: > {code} > 0: jdbc:drill:schema=dfs> alter system set `store.json.all_text_mode`= true; > +------------+------------+ > | ok | summary | > +------------+------------+ > | true | store.json.all_text_mode updated. | > +------------+------------+ > 1 row selected (0.079 seconds) > 0: jdbc:drill:schema=dfs> select * from `big_numeric.json`; > +------------+ > | a1 | > +------------+ > | 14994882832830675451 | > +------------+ > 1 row selected (0.07 seconds) > {code} > Other "ALTER SESSION" parameters that I tried and they seem to work: > * alter session set `exec.errors.verbose`= true; > * alter session set `planner.enable_hashjoin`=false; > * alter session set `planner.enable_hashagg`=false; > Not the same as DRILL-1769 (see below) > {code} > 0: jdbc:drill:schema=dfs> alter session set `planner.enable_hashagg`= false; > +------------+------------+ > | ok | summary | > +------------+------------+ > | true | planner.enable_hashagg updated. | > +------------+------------+ > 1 row selected (0.038 seconds) > 0: jdbc:drill:schema=dfs> select * from sys.options where name like '%enable_hashagg%' order by name; > +------------+------------+------------+------------+------------+------------+------------+ > | name | kind | type | num_val | string_val | bool_val | float_val | > +------------+------------+------------+------------+------------+------------+------------+ > | planner.enable_hashagg | BOOLEAN | SYSTEM | null | null | true | null | > | planner.enable_hashagg | BOOLEAN | SESSION | null | null | false | null | > +------------+------------+------------+------------+------------+------------+------------+ > 2 rows selected (0.133 seconds) > 0: jdbc:drill:schema=dfs> explain plan for select avg(o_totalprice) from cp.`tpch/orders.parquet` group by o_orderdate ; > +------------+------------+ > | text | json | > +------------+------------+ > | 00-00 Screen > 00-01 Project(EXPR$0=[CAST(/(CastHigh(CASE(=($2, 0), null, $1)), $2)):ANY]) > 00-02 StreamAgg(group=[{0}], agg#0=[$SUM0($1)], agg#1=[COUNT($1)]) > 00-03 Sort(sort0=[$0], dir0=[ASC]) > 00-04 Scan(groupscan=[ParquetGroupScan [entries=[ReadEntryWithPath [path=/tpch/orders.parquet]], selectionRoot=/tpch/orders.parquet, numFiles=1, columns=[`o_orderdate`, `o_totalprice`]]]) > 0: jdbc:drill:schema=dfs> alter session set `planner.enable_streamagg`= false; > +------------+------------+ > | ok | summary | > +------------+------------+ > | true | planner.enable_streamagg updated. | > +------------+------------+ > 1 row selected (0.039 seconds) > 0: jdbc:drill:schema=dfs> alter session set `planner.enable_hashagg`= true; > +------------+------------+ > | ok | summary | > +------------+------------+ > | true | planner.enable_hashagg updated. | > +------------+------------+ > 1 row selected (0.031 seconds) > 0: jdbc:drill:schema=dfs> explain plan for select avg(o_totalprice) from cp.`tpch/orders.parquet` group by o_orderdate ; > +------------+------------+ > | text | json | > +------------+------------+ > | 00-00 Screen > 00-01 Project(EXPR$0=[CAST(/(CastHigh(CASE(=($2, 0), null, $1)), $2)):ANY]) > 00-02 HashAgg(group=[{0}], agg#0=[$SUM0($1)], agg#1=[COUNT($1)]) > 00-03 Scan(groupscan=[ParquetGroupScan [entries=[ReadEntryWithPath [path=/tpch/orders.parquet]], selectionRoot=/tpch/orders.parquet, numFiles=1, columns=[`o_orderdate`, `o_totalprice`]]]) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)