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 D0308200D15 for ; Thu, 5 Oct 2017 22:38:21 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id CF46B1609E2; Thu, 5 Oct 2017 20:38:21 +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 1956F1609D2 for ; Thu, 5 Oct 2017 22:38:20 +0200 (CEST) Received: (qmail 39130 invoked by uid 500); 5 Oct 2017 20:38:20 -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 39118 invoked by uid 99); 5 Oct 2017 20:38:19 -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; Thu, 05 Oct 2017 20:38:19 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C1659F5A0C; Thu, 5 Oct 2017 20:38:19 +0000 (UTC) From: paul-rogers To: dev@drill.apache.org Reply-To: dev@drill.apache.org References: In-Reply-To: Subject: [GitHub] drill pull request #974: DRILL-5839: Handle Empty Batches in Merge Receiver Content-Type: text/plain Message-Id: <20171005203819.C1659F5A0C@git1-us-west.apache.org> Date: Thu, 5 Oct 2017 20:38:19 +0000 (UTC) archived-at: Thu, 05 Oct 2017 20:38:22 -0000 Github user paul-rogers commented on a diff in the pull request: https://github.com/apache/drill/pull/974#discussion_r143049947 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/mock/MockRecordReader.java --- @@ -52,7 +52,7 @@ public MockRecordReader(FragmentContext context, MockScanEntry config) { private int getEstimatedRecordSize(MockColumn[] types) { int x = 0; - for (int i = 0; i < types.length; i++) { + for (int i = 0; i < (types == null ? 0 : types.length); i++) { --- End diff -- Nit: maybe use: ``` if (types == null) { return 0; } // Original code here.. ``` ---