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 E8A9F200CFD for ; Wed, 6 Sep 2017 14:47:50 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E75601609C0; Wed, 6 Sep 2017 12:47:50 +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 5FAC51609B8 for ; Wed, 6 Sep 2017 14:47:50 +0200 (CEST) Received: (qmail 27002 invoked by uid 500); 6 Sep 2017 12:47:49 -0000 Mailing-List: contact issues-help@carbondata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@carbondata.apache.org Delivered-To: mailing list issues@carbondata.apache.org Received: (qmail 26989 invoked by uid 99); 6 Sep 2017 12:47:49 -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, 06 Sep 2017 12:47:49 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 6425EF3280; Wed, 6 Sep 2017 12:47:49 +0000 (UTC) From: jackylk To: issues@carbondata.apache.org Reply-To: issues@carbondata.apache.org References: In-Reply-To: Subject: [GitHub] carbondata pull request #1308: [CARBONDATA-1440]Fix coverity issues Content-Type: text/plain Message-Id: <20170906124749.6425EF3280@git1-us-west.apache.org> Date: Wed, 6 Sep 2017 12:47:49 +0000 (UTC) archived-at: Wed, 06 Sep 2017 12:47:51 -0000 Github user jackylk commented on a diff in the pull request: https://github.com/apache/carbondata/pull/1308#discussion_r137256155 --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeFixLengthColumnPage.java --- @@ -223,39 +223,39 @@ public BigDecimal getDecimal(int rowId) { @Override public int[] getIntPage() { int[] data = new int[getPageSize()]; - for (int i = 0; i < data.length; i++) { + for (long i = 0; i < data.length; i++) { long offset = i << intBits; - data[i] = CarbonUnsafe.getUnsafe().getInt(baseAddress, baseOffset + offset); + data[(int)i] = CarbonUnsafe.getUnsafe().getInt(baseAddress, baseOffset + offset); } return data; } @Override public long[] getLongPage() { long[] data = new long[getPageSize()]; - for (int i = 0; i < data.length; i++) { + for (long i = 0; i < data.length; i++) { long offset = i << longBits; - data[i] = CarbonUnsafe.getUnsafe().getLong(baseAddress, baseOffset + offset); + data[(int)i] = CarbonUnsafe.getUnsafe().getLong(baseAddress, baseOffset + offset); } return data; } @Override public float[] getFloatPage() { float[] data = new float[getPageSize()]; - for (int i = 0; i < data.length; i++) { + for (long i = 0; i < data.length; i++) { --- End diff -- why this modification is needed? ---