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 5D35319327 for ; Mon, 18 Apr 2016 16:52:26 +0000 (UTC) Received: (qmail 7318 invoked by uid 500); 18 Apr 2016 16:52:26 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 7292 invoked by uid 500); 18 Apr 2016 16:52:26 -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 7269 invoked by uid 99); 18 Apr 2016 16:52:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Apr 2016 16:52:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C71D82C1F54 for ; Mon, 18 Apr 2016 16:52:25 +0000 (UTC) Date: Mon, 18 Apr 2016 16:52:25 +0000 (UTC) From: "Vitalii Diravka (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-4614) Drill must appoint one data type per one column for self-describing data while querying directories 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-4614?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vitalii Diravka updated DRILL-4614: ----------------------------------- Description: While drill selects data from the directory and detects data types on-the-fly it is possible that one field will be of several data types . For example: 1. Create an input file as follows 20K rows with the following - {"some":"yes","others":{"other":"true","all":"false","sometimes":"yes"}} 200 rows with the following - {"some":"yes","others":{"other":"true","all":"false","sometimes":"yes","additional":"last entries only"}} 2. CTAS as follows {code:sql} CREATE TABLE dfs.`tmp`.`tp` as select * from dfs.`data.json` t {code} In this case will be created parquet table as the folder with two files. 3. Select the data {code} select t.others.additional from dfs.`tmp`.`tp` t {code} *The result of selecting will be mix of EXPR$0 and EXPR$0.* It happens because Drill defines column data type per file. The same result with json files. Since streaming aggregate does not support schema changes this issue makes impossible of using aggregate functions with query results. was: While drill selects data from the directory and detects data types on-the-fly it is possible that one field will be of several data types . For example: 1. Create an input file as follows 20K rows with the following - {"some":"yes","others":{"other":"true","all":"false","sometimes":"yes"}} 200 rows with the following - {"some":"yes","others":{"other":"true","all":"false","sometimes":"yes","additional":"last entries only"}} 2. CTAS as follows {code:sql} CREATE TABLE dfs.`tmp`.`tp` as select * from dfs.`data.json` t {code} In this case will be created parquet table as the folder with two files. 3. Select the data {code} select t.others.additional from dfs.`tmp`.`tp` t {code} The result of selecting will be mix of EXPR$0 and EXPR$0. It happens because Drill defines column data type per file. The same result with json files. Since streaming aggregate does not support schema changes this issue makes impossible of using aggregate functions with query results. > Drill must appoint one data type per one column for self-describing data while querying directories > ---------------------------------------------------------------------------------------------------- > > Key: DRILL-4614 > URL: https://issues.apache.org/jira/browse/DRILL-4614 > Project: Apache Drill > Issue Type: Bug > Components: Execution - Data Types > Affects Versions: 1.6.0 > Reporter: Vitalii Diravka > Assignee: Vitalii Diravka > Fix For: 1.7.0 > > > While drill selects data from the directory and detects data types on-the-fly > it is possible that one field will be of several data types . > For example: > 1. Create an input file as follows > 20K rows with the following - > {"some":"yes","others":{"other":"true","all":"false","sometimes":"yes"}} > 200 rows with the following - > {"some":"yes","others":{"other":"true","all":"false","sometimes":"yes","additional":"last > entries only"}} > 2. CTAS as follows > {code:sql} > CREATE TABLE dfs.`tmp`.`tp` as select * from dfs.`data.json` t > {code} > In this case will be created parquet table as the folder with two files. > 3. Select the data > {code} > select t.others.additional from dfs.`tmp`.`tp` t > {code} > *The result of selecting will be mix of EXPR$0 and EXPR$0.* > It happens because Drill defines column data type per file. > The same result with json files. > Since streaming aggregate does not support schema changes this issue makes impossible of using aggregate functions with query results. -- This message was sent by Atlassian JIRA (v6.3.4#6332)