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 B2302200B74 for ; Thu, 1 Sep 2016 19:23:42 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B0867160AB7; Thu, 1 Sep 2016 17:23:42 +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 03962160AA8 for ; Thu, 1 Sep 2016 19:23:41 +0200 (CEST) Received: (qmail 73248 invoked by uid 500); 1 Sep 2016 17:23:41 -0000 Mailing-List: contact notifications-help@asterixdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.apache.org Delivered-To: mailing list notifications@asterixdb.apache.org Received: (qmail 73237 invoked by uid 99); 1 Sep 2016 17:23:41 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Sep 2016 17:23:41 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id B0BBF18062B for ; Thu, 1 Sep 2016 17:23:40 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.919 X-Spam-Level: X-Spam-Status: No, score=0.919 tagged_above=-999 required=6.31 tests=[SPF_FAIL=0.919] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id NebSv9_14CBH for ; Thu, 1 Sep 2016 17:23:38 +0000 (UTC) Received: from unhygienix.ics.uci.edu (unhygienix.ics.uci.edu [128.195.14.130]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id CFD625FBA2 for ; Thu, 1 Sep 2016 17:23:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by unhygienix.ics.uci.edu (Postfix) with ESMTP id 1D19A241D8B; Thu, 1 Sep 2016 10:23:37 -0700 (PDT) Date: Thu, 1 Sep 2016 10:23:37 -0700 From: "Till Westmann (Code Review)" To: Michael Blow Message-ID: Reply-To: tillw@apache.org X-Gerrit-MessageType: newchange Subject: Change in asterixdb[master]: fix NPE in ValidateUtil X-Gerrit-Change-Id: I8f623441a3f5b72a9a0621d32d9d1a6aa5567d66 X-Gerrit-ChangeURL: X-Gerrit-Commit: 9158f80bc301163210511595dfe2b28498dd1cd3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.8.4 archived-at: Thu, 01 Sep 2016 17:23:42 -0000 Till Westmann has uploaded a new change for review. https://asterix-gerrit.ics.uci.edu/1139 Change subject: fix NPE in ValidateUtil ...................................................................... fix NPE in ValidateUtil Change-Id: I8f623441a3f5b72a9a0621d32d9d1a6aa5567d66 --- M asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/ValidateUtil.java M asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml 2 files changed, 7 insertions(+), 3 deletions(-) git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/39/1139/1 diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/ValidateUtil.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/ValidateUtil.java index 13153c2..76e62ae 100644 --- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/ValidateUtil.java +++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/ValidateUtil.java @@ -107,6 +107,10 @@ keySourceIndicators); for (int fidx = 0; fidx < partitioningExprTypes.size(); ++fidx) { IAType fieldType = partitioningExprTypes.get(fidx); + if (fieldType == null) { + throw new AsterixException( + "Type not found for partitioning key \"" + partitioningExprs.get(fidx) + "\""); + } switch (fieldType.getTypeTag()) { case INT8: case INT16: diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml index 01a036c..7fde712 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml +++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml @@ -3024,9 +3024,9 @@ partition-by-nonexistent-field - java.lang.NullPointerException - Cannot find dataset - Cannot find dataset testds in dataverse test nor an alias with name testds + Type not found for partitioning key "[id]" + Cannot find dataset testds in dataverse test + Cannot find dataset testds in dataverse test nor an alias with name testds! -- To view, visit https://asterix-gerrit.ics.uci.edu/1139 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8f623441a3f5b72a9a0621d32d9d1a6aa5567d66 Gerrit-PatchSet: 1 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Till Westmann