Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 57657200C7F for ; Wed, 24 May 2017 11:50:27 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 56169160BB4; Wed, 24 May 2017 09:50:27 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9CF74160B9C for ; Wed, 24 May 2017 11:50:26 +0200 (CEST) Received: (qmail 14399 invoked by uid 500); 24 May 2017 09:50:25 -0000 Mailing-List: contact dev-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 dev@drill.apache.org Received: (qmail 14374 invoked by uid 99); 24 May 2017 09:50:25 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 May 2017 09:50:25 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 10B0DDFF9F; Wed, 24 May 2017 09:50:25 +0000 (UTC) From: vvysotskyi To: dev@drill.apache.org Reply-To: dev@drill.apache.org References: In-Reply-To: Subject: [GitHub] drill pull request #805: Drill-4139: Exception while trying to prune partiti... Content-Type: text/plain Message-Id: <20170524095025.10B0DDFF9F@git1-us-west.apache.org> Date: Wed, 24 May 2017 09:50:25 +0000 (UTC) archived-at: Wed, 24 May 2017 09:50:27 -0000 Github user vvysotskyi commented on a diff in the pull request: https://github.com/apache/drill/pull/805#discussion_r117736018 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java --- @@ -508,21 +516,32 @@ public void populatePruningVector(ValueVector v, int index, SchemaPath column, S NullableVarBinaryVector varBinaryVector = (NullableVarBinaryVector) v; Object s = partitionValueMap.get(f).get(column); byte[] bytes; - if (s instanceof Binary) { - bytes = ((Binary) s).getBytes(); - } else if (s instanceof String) { - bytes = ((String) s).getBytes(); - } else if (s instanceof byte[]) { - bytes = (byte[]) s; + if (s == null) { + varBinaryVector.getMutator().setNull(index); + return; } else { - throw new UnsupportedOperationException("Unable to create column data for type: " + type); + bytes = getBytes(type, s); } varBinaryVector.getMutator().setSafe(index, bytes, 0, bytes.length); return; } case DECIMAL18: { NullableDecimal18Vector decimalVector = (NullableDecimal18Vector) v; - Long value = (Long) partitionValueMap.get(f).get(column); + Object s = partitionValueMap.get(f).get(column); --- End diff -- Done. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---