Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 11FFA11080 for ; Sat, 12 Jul 2014 05:31:07 +0000 (UTC) Received: (qmail 14120 invoked by uid 500); 12 Jul 2014 05:31:05 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 14041 invoked by uid 500); 12 Jul 2014 05:31:05 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 14029 invoked by uid 500); 12 Jul 2014 05:31:05 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 14021 invoked by uid 99); 12 Jul 2014 05:31:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Jul 2014 05:31:05 +0000 Date: Sat, 12 Jul 2014 05:31:05 +0000 (UTC) From: "Gopal V (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-7396) BucketingSortingReduceSinkOptimizer throws NullPointException during ETL 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/HIVE-7396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14059657#comment-14059657 ] Gopal V commented on HIVE-7396: ------------------------------- This is not just a simple NULL check missing. I made modifications to test this out {code} --- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/BucketingSortingReduceSinkOptimizer.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/BucketingSortingReduceSinkOptimizer.java @@ -498,7 +498,7 @@ public Object process(Node nd, Stack stack, NodeProcessorCtx procCtx, if (srcTable.isPartitioned()) { PrunedPartitionList prunedParts = pGraphContext.getOpToPartList().get(ts); - List partitions = prunedParts.getNotDeniedPartns(); + List partitions = (prunedParts != null ) ? prunedParts.getNotDeniedPartns() : null; // Support for dynamic partitions can be added later // The following is not optimized: {code} But then it generates a scan on only one partition instead of a full-table scan. > BucketingSortingReduceSinkOptimizer throws NullPointException during ETL > ------------------------------------------------------------------------ > > Key: HIVE-7396 > URL: https://issues.apache.org/jira/browse/HIVE-7396 > Project: Hive > Issue Type: Bug > Reporter: Gopal V > Priority: Trivial > > When a bucketed insert is performed from a partitioned table into a new table > {code} > 2014-07-11 22:11:30,176 ERROR [main]: ql.Driver (SessionState.java:printError(660)) - FAILED: NullPointerException null > java.lang.NullPointerException > at org.apache.hadoop.hive.ql.optimizer.BucketingSortingReduceSinkOptimizer$BucketSortReduceSinkProcessor.process(BucketingSortingReduceSinkOptimizer.java:501) > at org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher.dispatch(DefaultRuleDispatcher.java:90) > at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.dispatchAndReturn(DefaultGraphWalker.java:94) > at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.dispatch(DefaultGraphWalker.java:78) > at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.walk(DefaultGraphWalker.java:132) > at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.startWalking(DefaultGraphWalker.java:109) > at org.apache.hadoop.hive.ql.optimizer.BucketingSortingReduceSinkOptimizer.transform(BucketingSortingReduceSinkOptimizer.java:97) > at org.apache.hadoop.hive.ql.optimizer.Optimizer.optimize(Optimizer.java:146) > at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:9503) > at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:328) > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)