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 D077017689 for ; Fri, 26 Jun 2015 12:05:04 +0000 (UTC) Received: (qmail 62802 invoked by uid 500); 26 Jun 2015 12:05:04 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 62774 invoked by uid 500); 26 Jun 2015 12:05:04 -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 62762 invoked by uid 99); 26 Jun 2015 12:05:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Jun 2015 12:05:04 +0000 Date: Fri, 26 Jun 2015 12:05:04 +0000 (UTC) From: "Joanlynn LIN (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-3370) FLATTEN error with a where clause 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-3370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14602772#comment-14602772 ] Joanlynn LIN commented on DRILL-3370: ------------------------------------- OK, I've patched my project and the bug is verified fixed. Thanks a lot to all you guys. Hope to see Drill performs better in memory, distributed cache and also certain types of queries. Thanks again! > FLATTEN error with a where clause > --------------------------------- > > Key: DRILL-3370 > URL: https://issues.apache.org/jira/browse/DRILL-3370 > Project: Apache Drill > Issue Type: Bug > Components: Functions - Drill > Affects Versions: 1.0.0 > Reporter: Joanlynn LIN > Assignee: Jason Altekruse > Fix For: 1.1.0 > > Attachments: DRILL-3370.patch, jsonarray.150.json > > > I've got a JSON file which contains 150 JSON strings all like this: > {"arr": [94]} > {"arr": [39]} > {"arr": [180]} > I was trying to Flatten() the arrays and filter the values using such an SQL query: > select flatten(arr) as a from dfs.`/data/test/jsonarray.150.json` where a > 100; > However, it returned no result. Then I modified my expression like this: > select a from (select flatten(arr) as a from dfs.`/data/test/jsonarray.150.json`) where a > 100; > It then failed: > Error: SYSTEM ERROR: org.apache.drill.exec.exception.SchemaChangeException: Failure while trying to materialize incoming schema. Errors: > Error in expression at index -1. Error: Missing function implementation: [flatten(BIGINT-REPEATED)]. Full expression: --UNKNOWN EXPRESSION--.. > Fragment 0:0 > [Error Id: 1d71bf0e-48da-43f8-8b36-6a513120d7e0 on slave2:31010] (state=,code=0) > After a lot of attempts, I finally got it work: > select a from (select flatten(arr) as a from dfs.`/data/test/jsonarray.150.json` limit 10000000) where a > 100; > See, I just added a "limit 10000000" in this query and I am wondering if this is a bug or what in Drill? > Looking forward to your attention and help. Many thanks. -- This message was sent by Atlassian JIRA (v6.3.4#6332)