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 F148718E14 for ; Mon, 7 Mar 2016 21:24:40 +0000 (UTC) Received: (qmail 57032 invoked by uid 500); 7 Mar 2016 21:24:40 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 57002 invoked by uid 500); 7 Mar 2016 21:24:40 -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 56980 invoked by uid 99); 7 Mar 2016 21:24:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Mar 2016 21:24:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id AA4B42C044E for ; Mon, 7 Mar 2016 21:24:40 +0000 (UTC) Date: Mon, 7 Mar 2016 21:24:40 +0000 (UTC) From: "Suresh Ollala (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-4279) Improve performance for skipAll query against Text/JSON/Parquet table 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-4279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Suresh Ollala updated DRILL-4279: --------------------------------- Reviewer: Dechang Gu > Improve performance for skipAll query against Text/JSON/Parquet table > --------------------------------------------------------------------- > > Key: DRILL-4279 > URL: https://issues.apache.org/jira/browse/DRILL-4279 > Project: Apache Drill > Issue Type: Bug > Components: Query Planning & Optimization > Reporter: Jinfeng Ni > Assignee: Jinfeng Ni > Fix For: 1.6.0 > > > When query does not specify any specific column to be returned SCAN, for instance, > {code} > Q1: select count(*) from T1; > Q2: select 1 + 100 from T1; > Q3: select 1.0 + random() from T1; > {code} > Drill's planner would use a ColumnList with * column, plus a SKIP_ALL mode. However, the MODE is not serialized / deserialized. This leads to two problems. > 1). The EXPLAIN plan is confusing, since there is no way to different from a "SELECT * " query from this SKIP_ALL mode. > For instance, > {code} > explain plan for select count(*) from dfs.`/Users/jni/work/data/yelp/t1`; > 00-03 Project($f0=[0]) > 00-04 Scan(groupscan=[EasyGroupScan [selectionRoot=file:/Users/jni/work/data/yelp/t1, numFiles=2, columns=[`*`], files= ... > {code} > 2) If the query is to be executed distributed / parallel, the missing serialization of mode would means some Fragment is fetching all the columns, while some Fragment is skipping all the columns. That will cause execution error. > For instance, by changing slice_target to enforce the query to be executed in multiple fragments, it will hit execution error. > {code} > select count(*) from dfs.`/Users/jni/work/data/yelp/t1`; > org.apache.drill.common.exceptions.UserRemoteException: DATA_READ ERROR: Error parsing JSON - You tried to start when you are using a ValueWriter of type NullableBitWriterImpl. > {code} > Directory "t1" just contains two yelp JSON files. > Ideally, I think when no columns is required from SCAN, the explain plan should show an empty of column list. The MODE of SKIP_ALL together with star * column seems to be confusing and error prone. -- This message was sent by Atlassian JIRA (v6.3.4#6332)