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 5D19817D4E for ; Wed, 22 Jul 2015 22:53:09 +0000 (UTC) Received: (qmail 7286 invoked by uid 500); 22 Jul 2015 22:52:05 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 7207 invoked by uid 500); 22 Jul 2015 22:52:05 -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 7103 invoked by uid 99); 22 Jul 2015 22:52:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jul 2015 22:52:05 +0000 Date: Wed, 22 Jul 2015 22:52:05 +0000 (UTC) From: "Jacques Nadeau (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-3540) SQLline calls toString to convert complex columns into JSON. This translation doesn't work for some types MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DRILL-3540?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Nadeau updated DRILL-3540: ---------------------------------- Component/s: (was: Storage - JSON) Client - JDBC > SQLline calls toString to convert complex columns into JSON. This transl= ation doesn't work for some types > -------------------------------------------------------------------------= --------------------------------- > > Key: DRILL-3540 > URL: https://issues.apache.org/jira/browse/DRILL-3540 > Project: Apache Drill > Issue Type: Bug > Components: Client - JDBC > Affects Versions: 1.1.0 > Reporter: Stef=C3=A1n Baxter > Assignee: Steven Phillips > > test-datetime.json > { > "occurred_at" : { > "$date" : "2015-04-01T00:14:02.309Z" > }, > "sub":{ > "occurred_at":{"$date":"2015-04-01T00:14:02.309Z"} > } > } > correctly results in this (without timezone though): > select t.occurred_at, t.sub.occurred_at from dfs.tmp.`/test-datetime.jso= n` as t; > +--------------------------+--------------------------+ > | occurred_at | EXPR$1 | > +--------------------------+--------------------------+ > | 2015-04-01 00:14:02.309 | 2015-04-01 00:14:02.309 | > +--------------------------+--------------------------+ > 1 row selected (0.067 seconds) > here we select the substructure, not the field > select t.occurred_at, t.sub from dfs.tmp.`/test-datetime.json` as t; > incorrectly results in this: > +-------------+-----+ > | occurred_at | sub | > +-------------+-----+ > | 2015-04-01 00:14:02.309 | {"occurred_at":{"year":2015,"dayOfMonth":1,"d= ayOfWeek":3,"era":1,"dayOfYear":91,"weekyear":2015,"weekOfWeekyear":14,"mon= thOfYear":4,"yearOfEra":2015,"yearOfCentury":15,"centuryOfEra":20,"millisOf= Second":309,"millisOfDay":842309,"secondOfMinute":2,"secondOfDay":842,"minu= teOfHour":14,"minuteOfDay":14,"hourOfDay":0,"millis":1427847242309,"zone":{= "fixed":false,"uncachedZone":{"cachable":true,"fixed":false,"id":"Atlantic/= Reykjavik"},"id":"Atlantic/Reykjavik"},"chronology":{"zone":{"fixed":false,= "uncachedZone":{"cachable":true,"fixed":false,"id":"Atlantic/Reykjavik"},"i= d":"Atlantic/Reykjavik"}},"afterNow":false,"beforeNow":true,"equalNow":fals= e}} | > +-------------+-----+ > 1 row selected (0.066 seconds) -- This message was sent by Atlassian JIRA (v6.3.4#6332)