carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jack...@apache.org
Subject [11/11] incubator-carbondata git commit: remove redundant local variable
Date Tue, 11 Apr 2017 01:00:00 GMT
remove redundant local variable


Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/47b2fdd9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/47b2fdd9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/47b2fdd9

Branch: refs/heads/12-dev
Commit: 47b2fdd90f0460096c11f7acf8418c5ac0cd9e65
Parents: c2a4d55
Author: QiangCai <qiangcai@qq.com>
Authored: Fri Apr 7 20:10:20 2017 +0530
Committer: jackylk <jacky.likun@huawei.com>
Committed: Tue Apr 11 08:58:48 2017 +0800

----------------------------------------------------------------------
 .../dictionary/DictionaryCacheLoaderImpl.java   |  3 +--
 .../dictionary/DoubleArrayTrieDictionary.java   |  5 ++--
 .../dictionary/ReverseDictionaryCache.java      |  3 +--
 .../block/TableBlockUniqueIdentifier.java       |  3 +--
 .../core/datastore/impl/FileFactory.java        | 10 +++-----
 .../DateDirectDictionaryGenerator.java          |  3 +--
 .../core/keygenerator/mdkey/Bits.java           |  3 +--
 .../keygenerator/mdkey/NumberCompressor.java    |  7 +++--
 .../core/mutate/CarbonUpdateUtil.java           | 14 ++++------
 .../CarbonDictionaryMetadataReaderImpl.java     | 12 +++------
 .../core/reader/CarbonIndexFileReader.java      |  6 ++---
 .../core/scan/expression/ColumnExpression.java  |  4 +--
 .../core/scan/expression/LiteralExpression.java |  6 ++---
 .../executer/RowLevelFilterExecuterImpl.java    |  6 ++---
 .../executer/ValueBasedFilterExecuterImpl.java  |  6 ++---
 .../iterator/DetailQueryResultIterator.java     |  3 +--
 .../SegmentUpdateStatusManager.java             |  5 ++--
 .../apache/carbondata/core/util/CarbonUtil.java | 15 +++++------
 .../core/util/path/CarbonStorePath.java         |  3 +--
 .../core/util/path/CarbonTablePath.java         |  6 ++---
 .../dictionary/AbstractDictionaryCacheTest.java |  6 ++---
 .../dictionary/ReverseDictionaryCacheTest.java  |  4 +--
 .../block/SegmentPropertiesTestUtil.java        |  3 +--
 .../filesystem/AlluxioCarbonFileTest.java       |  6 ++---
 .../filesystem/HDFSCarbonFileTest.java          |  9 +++----
 .../filesystem/LocalCarbonFileTest.java         |  3 +--
 .../filesystem/ViewFsCarbonFileTest.java        |  6 ++---
 .../ThriftWrapperSchemaConverterImplTest.java   |  3 +--
 .../core/scan/executor/util/QueryUtilTest.java  |  9 +++----
 .../core/util/RangeFilterProcessorTest.java     | 21 +++++----------
 .../processing/merger/CarbonCompactionUtil.java |  3 +--
 .../processing/merger/CarbonDataMergerUtil.java | 27 ++++++++------------
 .../merger/CompactionResultSortProcessor.java   |  3 +--
 .../newflow/DataLoadProcessBuilder.java         | 12 +++------
 .../DictionaryServerClientDictionary.java       |  3 +--
 ...arallelReadMergeSorterWithBucketingImpl.java |  4 +--
 .../holder/UnsafeSortTempFileChunkHolder.java   |  3 +--
 .../steps/DataConverterProcessorStepImpl.java   |  3 +--
 ...ConverterProcessorWithBucketingStepImpl.java |  3 +--
 .../newflow/steps/SortProcessorStepImpl.java    |  3 +--
 .../sortdata/SortTempFileChunkHolder.java       |  3 +--
 .../store/CarbonFactDataHandlerModel.java       | 14 ++++------
 .../util/CarbonDataProcessorUtil.java           |  3 +--
 .../processing/util/NonDictionaryUtil.java      |  3 +--
 44 files changed, 94 insertions(+), 186 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/main/java/org/apache/carbondata/core/cache/dictionary/DictionaryCacheLoaderImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/cache/dictionary/DictionaryCacheLoaderImpl.java b/core/src/main/java/org/apache/carbondata/core/cache/dictionary/DictionaryCacheLoaderImpl.java
index 4a0c2e8..5373ca8 100644
--- a/core/src/main/java/org/apache/carbondata/core/cache/dictionary/DictionaryCacheLoaderImpl.java
+++ b/core/src/main/java/org/apache/carbondata/core/cache/dictionary/DictionaryCacheLoaderImpl.java
@@ -128,8 +128,7 @@ public class DictionaryCacheLoaderImpl implements DictionaryCacheLoader {
       throws IOException {
     CarbonDictionaryReader dictionaryReader = getDictionaryReader(columnIdentifier);
     try {
-      Iterator<byte[]> columnDictionaryChunkWrapper = dictionaryReader.read(startOffset, endOffset);
-      return columnDictionaryChunkWrapper;
+      return dictionaryReader.read(startOffset, endOffset);
     } finally {
       dictionaryReader.close();
     }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/main/java/org/apache/carbondata/core/cache/dictionary/DoubleArrayTrieDictionary.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/cache/dictionary/DoubleArrayTrieDictionary.java b/core/src/main/java/org/apache/carbondata/core/cache/dictionary/DoubleArrayTrieDictionary.java
index 26b12bf..aeec846 100644
--- a/core/src/main/java/org/apache/carbondata/core/cache/dictionary/DoubleArrayTrieDictionary.java
+++ b/core/src/main/java/org/apache/carbondata/core/cache/dictionary/DoubleArrayTrieDictionary.java
@@ -223,11 +223,10 @@ public class DoubleArrayTrieDictionary {
    */
   private int conflict(int start, int bKey) {
     int from = start;
-    int newKey = bKey;
     TreeSet<Integer> children = getChildren(from);
-    children.add(new Integer(newKey));
+    children.add(new Integer(bKey));
     int newBasePos = findFreeRoom(children);
-    children.remove(new Integer(newKey));
+    children.remove(new Integer(bKey));
 
     int oldBasePos = base[start];
     base[start] = newBasePos;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/main/java/org/apache/carbondata/core/cache/dictionary/ReverseDictionaryCache.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/cache/dictionary/ReverseDictionaryCache.java b/core/src/main/java/org/apache/carbondata/core/cache/dictionary/ReverseDictionaryCache.java
index 55dfa0e..acb9acf 100644
--- a/core/src/main/java/org/apache/carbondata/core/cache/dictionary/ReverseDictionaryCache.java
+++ b/core/src/main/java/org/apache/carbondata/core/cache/dictionary/ReverseDictionaryCache.java
@@ -89,8 +89,7 @@ public class ReverseDictionaryCache<K extends DictionaryColumnUniqueIdentifier,
     for (final DictionaryColumnUniqueIdentifier uniqueIdent : dictionaryColumnUniqueIdentifiers) {
       taskSubmitList.add(executorService.submit(new Callable<Dictionary>() {
         @Override public Dictionary call() throws IOException {
-          Dictionary dictionary = getDictionary(uniqueIdent);
-          return dictionary;
+          return getDictionary(uniqueIdent);
         }
       }));
     }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/main/java/org/apache/carbondata/core/datastore/block/TableBlockUniqueIdentifier.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/datastore/block/TableBlockUniqueIdentifier.java b/core/src/main/java/org/apache/carbondata/core/datastore/block/TableBlockUniqueIdentifier.java
index e873b85..0434066 100644
--- a/core/src/main/java/org/apache/carbondata/core/datastore/block/TableBlockUniqueIdentifier.java
+++ b/core/src/main/java/org/apache/carbondata/core/datastore/block/TableBlockUniqueIdentifier.java
@@ -78,11 +78,10 @@ public class TableBlockUniqueIdentifier {
     BlockInfo blockInfo = new BlockInfo(this.tableBlockInfo);
     CarbonTableIdentifier carbonTableIdentifier =
         this.absoluteTableIdentifier.getCarbonTableIdentifier();
-    String uniqueTableBlockName = carbonTableIdentifier.getDatabaseName()
+    return carbonTableIdentifier.getDatabaseName()
         + CarbonCommonConstants.FILE_SEPARATOR + carbonTableIdentifier
         .getDatabaseName() + CarbonCommonConstants.FILE_SEPARATOR
         + this.tableBlockInfo.getSegmentId()
         + CarbonCommonConstants.FILE_SEPARATOR + blockInfo.hashCode();
-    return uniqueTableBlockName;
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/main/java/org/apache/carbondata/core/datastore/impl/FileFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/datastore/impl/FileFactory.java b/core/src/main/java/org/apache/carbondata/core/datastore/impl/FileFactory.java
index 27931fe..ae9e010 100644
--- a/core/src/main/java/org/apache/carbondata/core/datastore/impl/FileFactory.java
+++ b/core/src/main/java/org/apache/carbondata/core/datastore/impl/FileFactory.java
@@ -191,8 +191,7 @@ public final class FileFactory {
       case VIEWFS:
         Path pt = new Path(path);
         FileSystem fs = pt.getFileSystem(configuration);
-        FSDataOutputStream stream = fs.create(pt, true);
-        return stream;
+        return fs.create(pt, true);
       default:
         return new DataOutputStream(new BufferedOutputStream(new FileOutputStream(path)));
     }
@@ -244,9 +243,7 @@ public final class FileFactory {
       case VIEWFS:
         Path pt = new Path(path);
         FileSystem fs = pt.getFileSystem(configuration);
-        FSDataOutputStream stream =
-            fs.create(pt, true, bufferSize, fs.getDefaultReplication(pt), blockSize);
-        return stream;
+        return fs.create(pt, true, bufferSize, fs.getDefaultReplication(pt), blockSize);
       default:
         path = getUpdatedFilePath(path, fileType);
         return new DataOutputStream(
@@ -402,8 +399,7 @@ public final class FileFactory {
       case VIEWFS:
         Path pt = new Path(path);
         FileSystem fs = pt.getFileSystem(configuration);
-        FSDataOutputStream stream = fs.append(pt);
-        return stream;
+        return fs.append(pt);
       default:
         return new DataOutputStream(new BufferedOutputStream(new FileOutputStream(path)));
     }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/main/java/org/apache/carbondata/core/keygenerator/directdictionary/timestamp/DateDirectDictionaryGenerator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/keygenerator/directdictionary/timestamp/DateDirectDictionaryGenerator.java b/core/src/main/java/org/apache/carbondata/core/keygenerator/directdictionary/timestamp/DateDirectDictionaryGenerator.java
index 8db42b0..a21fd85 100644
--- a/core/src/main/java/org/apache/carbondata/core/keygenerator/directdictionary/timestamp/DateDirectDictionaryGenerator.java
+++ b/core/src/main/java/org/apache/carbondata/core/keygenerator/directdictionary/timestamp/DateDirectDictionaryGenerator.java
@@ -152,8 +152,7 @@ public class DateDirectDictionaryGenerator implements DirectDictionaryGenerator
 
   private int generateKey(long timeValue) {
     long milli = timeValue + threadLocalLocalTimeZone.get().getOffset(timeValue);
-    int key = (int) Math.floor((double) milli / MILLIS_PER_DAY) + cutOffDate;
-    return key;
+    return (int) Math.floor((double) milli / MILLIS_PER_DAY) + cutOffDate;
   }
 
   public void initialize() {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/main/java/org/apache/carbondata/core/keygenerator/mdkey/Bits.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/keygenerator/mdkey/Bits.java b/core/src/main/java/org/apache/carbondata/core/keygenerator/mdkey/Bits.java
index 044a77b..822b343 100644
--- a/core/src/main/java/org/apache/carbondata/core/keygenerator/mdkey/Bits.java
+++ b/core/src/main/java/org/apache/carbondata/core/keygenerator/mdkey/Bits.java
@@ -89,9 +89,8 @@ public class Bits implements Serializable {
    * {start, end}
    */
   public int[] getKeyByteOffsets(int index) {
-    int prefixPaddingBits = length % 8 == 0 ? 0 : (8 - length % 8);
 
-    int priorLen = prefixPaddingBits;
+    int priorLen = length % 8 == 0 ? 0 : (8 - length % 8);
     int start = 0;
     int end = 0;
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/main/java/org/apache/carbondata/core/keygenerator/mdkey/NumberCompressor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/keygenerator/mdkey/NumberCompressor.java b/core/src/main/java/org/apache/carbondata/core/keygenerator/mdkey/NumberCompressor.java
index af58f50..d601159 100644
--- a/core/src/main/java/org/apache/carbondata/core/keygenerator/mdkey/NumberCompressor.java
+++ b/core/src/main/java/org/apache/carbondata/core/keygenerator/mdkey/NumberCompressor.java
@@ -138,10 +138,9 @@ public class NumberCompressor {
   }
 
   public int[] unCompress(byte[] key, int offset, int length) {
-    int ls = length;
-    int arrayLength = (ls * BYTE_LENGTH) / bitsLength;
-    long[] words = new long[getWordsSizeFromBytesSize(ls)];
-    unCompressVal(key, ls, words, offset);
+    int arrayLength = (length * BYTE_LENGTH) / bitsLength;
+    long[] words = new long[getWordsSizeFromBytesSize(length)];
+    unCompressVal(key, length, words, offset);
     return getArray(words, arrayLength);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java b/core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java
index fef5905..af26035 100644
--- a/core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java
+++ b/core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java
@@ -340,8 +340,7 @@ public class CarbonUpdateUtil {
    */
   public static Long getTimeStampAsLong(String timtstamp) {
     try {
-      long longValue = Long.parseLong(timtstamp);
-      return longValue;
+      return Long.parseLong(timtstamp);
     } catch (NumberFormatException nfe) {
       String errorMsg = "Invalid timestamp : " + timtstamp;
       LOGGER.error(errorMsg);
@@ -358,8 +357,7 @@ public class CarbonUpdateUtil {
    */
   public static Integer getIntegerValue(String value) throws Exception {
     try {
-      int intValue = Integer.parseInt(value);
-      return intValue;
+      return Integer.parseInt(value);
     } catch (NumberFormatException nfe) {
       LOGGER.error("Invalid row : " + value + nfe.getLocalizedMessage());
       throw new Exception("Invalid row : " + nfe.getLocalizedMessage());
@@ -373,9 +371,8 @@ public class CarbonUpdateUtil {
    * @return
    */
   public static String getBlockName(String completeBlockName) {
-    String blockName =
-        completeBlockName.substring(0, completeBlockName.lastIndexOf(CarbonCommonConstants.HYPHEN));
-    return blockName;
+    return completeBlockName
+        .substring(0, completeBlockName.lastIndexOf(CarbonCommonConstants.HYPHEN));
   }
 
   /**
@@ -385,8 +382,7 @@ public class CarbonUpdateUtil {
    * @return
    */
   public static String getSegmentId(String segmentName) {
-    String id = segmentName.split(CarbonCommonConstants.UNDERSCORE)[1];
-    return id;
+    return segmentName.split(CarbonCommonConstants.UNDERSCORE)[1];
   }
 
   public static int getLatestTaskIdForSegment(String segmentId, CarbonTablePath tablePath) {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/main/java/org/apache/carbondata/core/reader/CarbonDictionaryMetadataReaderImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/reader/CarbonDictionaryMetadataReaderImpl.java b/core/src/main/java/org/apache/carbondata/core/reader/CarbonDictionaryMetadataReaderImpl.java
index 79ca689..98c0ddb 100644
--- a/core/src/main/java/org/apache/carbondata/core/reader/CarbonDictionaryMetadataReaderImpl.java
+++ b/core/src/main/java/org/apache/carbondata/core/reader/CarbonDictionaryMetadataReaderImpl.java
@@ -130,9 +130,7 @@ public class CarbonDictionaryMetadataReaderImpl implements CarbonDictionaryMetad
       dictionaryChunkMeta = (ColumnDictionaryChunkMeta) dictionaryMetadataFileReader.read();
     }
     // create a new instance of chunk meta wrapper using thrift object
-    CarbonDictionaryColumnMetaChunk columnMetaChunkForLastSegment =
-        getNewInstanceOfCarbonDictionaryColumnMetaChunk(dictionaryChunkMeta);
-    return columnMetaChunkForLastSegment;
+    return getNewInstanceOfCarbonDictionaryColumnMetaChunk(dictionaryChunkMeta);
   }
 
   /**
@@ -190,10 +188,8 @@ public class CarbonDictionaryMetadataReaderImpl implements CarbonDictionaryMetad
    */
   private CarbonDictionaryColumnMetaChunk getNewInstanceOfCarbonDictionaryColumnMetaChunk(
       ColumnDictionaryChunkMeta dictionaryChunkMeta) {
-    CarbonDictionaryColumnMetaChunk columnMetaChunk =
-        new CarbonDictionaryColumnMetaChunk(dictionaryChunkMeta.getMin_surrogate_key(),
-            dictionaryChunkMeta.getMax_surrogate_key(), dictionaryChunkMeta.getStart_offset(),
-            dictionaryChunkMeta.getEnd_offset(), dictionaryChunkMeta.getChunk_count());
-    return columnMetaChunk;
+    return new CarbonDictionaryColumnMetaChunk(dictionaryChunkMeta.getMin_surrogate_key(),
+        dictionaryChunkMeta.getMax_surrogate_key(), dictionaryChunkMeta.getStart_offset(),
+        dictionaryChunkMeta.getEnd_offset(), dictionaryChunkMeta.getChunk_count());
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/main/java/org/apache/carbondata/core/reader/CarbonIndexFileReader.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/reader/CarbonIndexFileReader.java b/core/src/main/java/org/apache/carbondata/core/reader/CarbonIndexFileReader.java
index b2c2cb5..dc46242 100644
--- a/core/src/main/java/org/apache/carbondata/core/reader/CarbonIndexFileReader.java
+++ b/core/src/main/java/org/apache/carbondata/core/reader/CarbonIndexFileReader.java
@@ -40,12 +40,11 @@ public class CarbonIndexFileReader {
    * @throws IOException if any problem  while reader the header
    */
   public IndexHeader readIndexHeader() throws IOException {
-    IndexHeader indexHeader = (IndexHeader) thriftReader.read(new ThriftReader.TBaseCreator() {
+    return (IndexHeader) thriftReader.read(new ThriftReader.TBaseCreator() {
       @Override public TBase create() {
         return new IndexHeader();
       }
     });
-    return indexHeader;
   }
 
   /**
@@ -62,12 +61,11 @@ public class CarbonIndexFileReader {
    * @throws IOException if problem while reading the block index
    */
   public BlockIndex readBlockIndexInfo() throws IOException {
-    BlockIndex blockInfo = (BlockIndex) thriftReader.read(new ThriftReader.TBaseCreator() {
+    return (BlockIndex) thriftReader.read(new ThriftReader.TBaseCreator() {
       @Override public TBase create() {
         return new BlockIndex();
       }
     });
-    return blockInfo;
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/main/java/org/apache/carbondata/core/scan/expression/ColumnExpression.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/scan/expression/ColumnExpression.java b/core/src/main/java/org/apache/carbondata/core/scan/expression/ColumnExpression.java
index 69fa9d6..d27d789 100644
--- a/core/src/main/java/org/apache/carbondata/core/scan/expression/ColumnExpression.java
+++ b/core/src/main/java/org/apache/carbondata/core/scan/expression/ColumnExpression.java
@@ -86,9 +86,7 @@ public class ColumnExpression extends LeafExpression {
   }
 
   @Override public ExpressionResult evaluate(RowIntf value) {
-    ExpressionResult expressionResult =
-        new ExpressionResult(dataType, (null == value ? null : value.getVal(colIndex)));
-    return expressionResult;
+    return new ExpressionResult(dataType, (null == value ? null : value.getVal(colIndex)));
   }
 
   @Override public ExpressionType getFilterExpressionType() {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/main/java/org/apache/carbondata/core/scan/expression/LiteralExpression.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/scan/expression/LiteralExpression.java b/core/src/main/java/org/apache/carbondata/core/scan/expression/LiteralExpression.java
index 112bf03..b194e3c 100644
--- a/core/src/main/java/org/apache/carbondata/core/scan/expression/LiteralExpression.java
+++ b/core/src/main/java/org/apache/carbondata/core/scan/expression/LiteralExpression.java
@@ -37,13 +37,11 @@ public class LiteralExpression extends LeafExpression {
   }
 
   @Override public ExpressionResult evaluate(RowIntf value) {
-    ExpressionResult expressionResult = new ExpressionResult(dataType, this.value, true);
-    return expressionResult;
+    return new ExpressionResult(dataType, this.value, true);
   }
 
   public ExpressionResult getExpressionResult() {
-    ExpressionResult expressionResult = new ExpressionResult(dataType, this.value, true);
-    return expressionResult;
+    return new ExpressionResult(dataType, this.value, true);
   }
 
   @Override public ExpressionType getFilterExpressionType() {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelFilterExecuterImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelFilterExecuterImpl.java b/core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelFilterExecuterImpl.java
index 10902ea..d92b7d4 100644
--- a/core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelFilterExecuterImpl.java
+++ b/core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelFilterExecuterImpl.java
@@ -422,8 +422,7 @@ public class RowLevelFilterExecuterImpl implements FilterExecuter {
     if (dimColumnEvaluatorInfo.getDimension().isColumnar()) {
       byte[] rawData = dataChunk.getChunkData(index);
       ByteBuffer byteBuffer = ByteBuffer.allocate(CarbonCommonConstants.INT_SIZE_IN_BYTE);
-      int dictionaryValue = CarbonUtil.getSurrogateKey(rawData, byteBuffer);
-      return dictionaryValue;
+      return CarbonUtil.getSurrogateKey(rawData, byteBuffer);
     } else {
       return readSurrogatesFromColumnGroupBlock(dataChunk, index, dimColumnEvaluatorInfo);
     }
@@ -444,9 +443,8 @@ public class RowLevelFilterExecuterImpl implements FilterExecuter {
       long[] result = keyStructureInfo.getKeyGenerator().getKeyArray(colData);
       int colGroupId =
           QueryUtil.getColumnGroupId(segmentProperties, dimensionBlocksIndex[0]);
-      int dictionaryValue = (int) result[segmentProperties
+      return (int) result[segmentProperties
           .getColumnGroupMdKeyOrdinal(colGroupId, dimensionBlocksIndex[0])];
-      return dictionaryValue;
     } catch (KeyGenException e) {
       LOGGER.error(e);
     }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ValueBasedFilterExecuterImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ValueBasedFilterExecuterImpl.java b/core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ValueBasedFilterExecuterImpl.java
index 003d15e..3e33d04 100644
--- a/core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ValueBasedFilterExecuterImpl.java
+++ b/core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ValueBasedFilterExecuterImpl.java
@@ -28,13 +28,11 @@ public class ValueBasedFilterExecuterImpl implements FilterExecuter {
   @Override public BitSetGroup applyFilter(BlocksChunkHolder blockChunkHolder)
       throws FilterUnsupportedException, IOException {
 
-    BitSetGroup bitSetGroup = new BitSetGroup(0);
-    return bitSetGroup;
+    return new BitSetGroup(0);
   }
 
   @Override public BitSet isScanRequired(byte[][] blockMaxValue, byte[][] blockMinValue) {
-    BitSet bitSet = new BitSet(1);
-    return bitSet;
+    return new BitSet(1);
   }
 
   @Override public void readBlocks(BlocksChunkHolder blockChunkHolder) throws IOException {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/main/java/org/apache/carbondata/core/scan/result/iterator/DetailQueryResultIterator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/scan/result/iterator/DetailQueryResultIterator.java b/core/src/main/java/org/apache/carbondata/core/scan/result/iterator/DetailQueryResultIterator.java
index e39b93f..747f5a9 100644
--- a/core/src/main/java/org/apache/carbondata/core/scan/result/iterator/DetailQueryResultIterator.java
+++ b/core/src/main/java/org/apache/carbondata/core/scan/result/iterator/DetailQueryResultIterator.java
@@ -38,8 +38,7 @@ public class DetailQueryResultIterator extends AbstractDetailQueryResultIterator
   }
 
   @Override public BatchResult next() {
-    BatchResult batchResult = getBatchResult();
-    return batchResult;
+    return getBatchResult();
   }
 
   private BatchResult getBatchResult() {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java b/core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java
index c822935..70e1993 100644
--- a/core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java
+++ b/core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java
@@ -427,7 +427,8 @@ public class SegmentUpdateStatusManager {
             getStartTimeOfDeltaFile(CarbonCommonConstants.DELETE_DELTA_FILE_EXT, block);
         final long deltaEndTimeStamp =
             getEndTimeOfDeltaFile(CarbonCommonConstants.DELETE_DELTA_FILE_EXT, block);
-        CarbonFile[] files = segDir.listFiles(new CarbonFileFilter() {
+
+        return segDir.listFiles(new CarbonFileFilter() {
 
           @Override public boolean accept(CarbonFile pathName) {
             String fileName = pathName.getName();
@@ -444,8 +445,6 @@ public class SegmentUpdateStatusManager {
             return false;
           }
         });
-
-        return files;
       }
     }
     return null;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java b/core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java
index c48b2a5..9a48e1b 100644
--- a/core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java
+++ b/core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java
@@ -722,9 +722,8 @@ public final class CarbonUtil {
     if (null == prop) {
       return null;
     }
-    String basePath = prop.getProperty(CarbonCommonConstants.STORE_LOCATION,
+    return prop.getProperty(CarbonCommonConstants.STORE_LOCATION,
         CarbonCommonConstants.STORE_LOCATION_DEFAULT_VAL);
-    return basePath;
   }
 
   /**
@@ -1055,9 +1054,8 @@ public final class CarbonUtil {
         isDictionaryDimensions.add(false);
       }
     }
-    boolean[] primitive = ArrayUtils
+    return ArrayUtils
         .toPrimitive(isDictionaryDimensions.toArray(new Boolean[isDictionaryDimensions.size()]));
-    return primitive;
   }
 
   /**
@@ -1594,14 +1592,13 @@ public final class CarbonUtil {
       return true;
     }
 
-    UpdateVO updatedVODetails = invalidBlockVOForSegmentId;
-    if (null != updatedVODetails) {
+    if (null != invalidBlockVOForSegmentId) {
       Long blockTimeStamp = Long.parseLong(tableInfo.getFilePath()
           .substring(tableInfo.getFilePath().lastIndexOf('-') + 1,
               tableInfo.getFilePath().lastIndexOf('.')));
-      if ((blockTimeStamp > updatedVODetails.getFactTimestamp() && (
-          updatedVODetails.getUpdateDeltaStartTimestamp() != null
-              && blockTimeStamp < updatedVODetails.getUpdateDeltaStartTimestamp()))) {
+      if ((blockTimeStamp > invalidBlockVOForSegmentId.getFactTimestamp() && (
+          invalidBlockVOForSegmentId.getUpdateDeltaStartTimestamp() != null
+              && blockTimeStamp < invalidBlockVOForSegmentId.getUpdateDeltaStartTimestamp()))) {
         return true;
       }
     }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/main/java/org/apache/carbondata/core/util/path/CarbonStorePath.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/util/path/CarbonStorePath.java b/core/src/main/java/org/apache/carbondata/core/util/path/CarbonStorePath.java
index 54de175..3aece69 100644
--- a/core/src/main/java/org/apache/carbondata/core/util/path/CarbonStorePath.java
+++ b/core/src/main/java/org/apache/carbondata/core/util/path/CarbonStorePath.java
@@ -40,10 +40,9 @@ public class CarbonStorePath extends Path {
    */
   public static CarbonTablePath getCarbonTablePath(String storePath,
       CarbonTableIdentifier tableIdentifier) {
-    CarbonTablePath carbonTablePath = new CarbonTablePath(tableIdentifier,
+    return new CarbonTablePath(tableIdentifier,
         storePath + File.separator + tableIdentifier.getDatabaseName() + File.separator
             + tableIdentifier.getTableName());
-    return carbonTablePath;
   }
 
   public static CarbonTablePath getCarbonTablePath(String storePath,

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/main/java/org/apache/carbondata/core/util/path/CarbonTablePath.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/util/path/CarbonTablePath.java b/core/src/main/java/org/apache/carbondata/core/util/path/CarbonTablePath.java
index 3e81fbb..d42ae9a 100644
--- a/core/src/main/java/org/apache/carbondata/core/util/path/CarbonTablePath.java
+++ b/core/src/main/java/org/apache/carbondata/core/util/path/CarbonTablePath.java
@@ -557,12 +557,11 @@ public class CarbonTablePath extends Path {
    * @return sort index carbon files
    */
   public CarbonFile[] getSortIndexFiles(CarbonFile sortIndexDir, final String columnUniqueId) {
-    CarbonFile[] files = sortIndexDir.listFiles(new CarbonFileFilter() {
+    return sortIndexDir.listFiles(new CarbonFileFilter() {
       @Override public boolean accept(CarbonFile file) {
         return file.getName().startsWith(columnUniqueId) && file.getName().endsWith(SORT_INDEX_EXT);
       }
     });
-    return files;
   }
 
   /**
@@ -572,10 +571,9 @@ public class CarbonTablePath extends Path {
    * @return
    */
   public static String getCarbonDataFileName(String carbonDataFilePath) {
-    String carbonDataFileName = carbonDataFilePath
+    return carbonDataFilePath
         .substring(carbonDataFilePath.lastIndexOf(CarbonCommonConstants.FILE_SEPARATOR) + 1,
             carbonDataFilePath.indexOf(CARBON_DATA_EXT));
-    return carbonDataFileName;
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/test/java/org/apache/carbondata/core/cache/dictionary/AbstractDictionaryCacheTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/cache/dictionary/AbstractDictionaryCacheTest.java b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/AbstractDictionaryCacheTest.java
index 2bbe458..2fa2b93 100644
--- a/core/src/test/java/org/apache/carbondata/core/cache/dictionary/AbstractDictionaryCacheTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/AbstractDictionaryCacheTest.java
@@ -104,10 +104,8 @@ public class AbstractDictionaryCacheTest {
   protected DictionaryColumnUniqueIdentifier createDictionaryColumnUniqueIdentifier(
       String columnId) {
 	ColumnIdentifier columnIdentifier = new ColumnIdentifier(columnId, null, DataType.STRING);
-    DictionaryColumnUniqueIdentifier dictionaryColumnUniqueIdentifier =
-        new DictionaryColumnUniqueIdentifier(carbonTableIdentifier, columnIdentifier,
-            DataType.STRING);
-    return dictionaryColumnUniqueIdentifier;
+    return new DictionaryColumnUniqueIdentifier(carbonTableIdentifier, columnIdentifier,
+        DataType.STRING);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ReverseDictionaryCacheTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ReverseDictionaryCacheTest.java b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ReverseDictionaryCacheTest.java
index f5eff67..628c3ff 100644
--- a/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ReverseDictionaryCacheTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ReverseDictionaryCacheTest.java
@@ -271,8 +271,6 @@ public class ReverseDictionaryCacheTest extends AbstractDictionaryCacheTest {
   protected DictionaryColumnUniqueIdentifier createDictionaryColumnUniqueIdentifier(
 	      String columnId) {
 	    ColumnIdentifier columnIdentifier = new ColumnIdentifier(columnId, null, DataType.DOUBLE);
-	    DictionaryColumnUniqueIdentifier dictionaryColumnUniqueIdentifier =
-	        new DictionaryColumnUniqueIdentifier(carbonTableIdentifier, columnIdentifier);
-	    return dictionaryColumnUniqueIdentifier;
+    return new DictionaryColumnUniqueIdentifier(carbonTableIdentifier, columnIdentifier);
 	  }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/test/java/org/apache/carbondata/core/datastore/block/SegmentPropertiesTestUtil.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/datastore/block/SegmentPropertiesTestUtil.java b/core/src/test/java/org/apache/carbondata/core/datastore/block/SegmentPropertiesTestUtil.java
index 2bfe40d..5a941b3 100644
--- a/core/src/test/java/org/apache/carbondata/core/datastore/block/SegmentPropertiesTestUtil.java
+++ b/core/src/test/java/org/apache/carbondata/core/datastore/block/SegmentPropertiesTestUtil.java
@@ -47,8 +47,7 @@ public class SegmentPropertiesTestUtil {
       cardinality[i] = x;
       x++;
     }
-    SegmentProperties segmentProperties = new SegmentProperties(columnSchema, cardinality);
-    return segmentProperties;
+    return new SegmentProperties(columnSchema, cardinality);
   }
 
   public static ColumnSchema getDimensionColumn1() {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/test/java/org/apache/carbondata/core/datastore/filesystem/AlluxioCarbonFileTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/datastore/filesystem/AlluxioCarbonFileTest.java b/core/src/test/java/org/apache/carbondata/core/datastore/filesystem/AlluxioCarbonFileTest.java
index a691dc7..eff0d8b 100644
--- a/core/src/test/java/org/apache/carbondata/core/datastore/filesystem/AlluxioCarbonFileTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/datastore/filesystem/AlluxioCarbonFileTest.java
@@ -135,8 +135,7 @@ public class AlluxioCarbonFileTest {
             @Mock
             public FileStatus[] listStatus(Path var1) throws IOException {
 
-                FileStatus[] fileStatus = new FileStatus[]{new FileStatus(12L, true, 60, 120l, 180L, new Path(fileName))};
-                return fileStatus;
+                return new FileStatus[]{new FileStatus(12L, true, 60, 120l, 180L, new Path(fileName))};
             }
 
         };
@@ -207,8 +206,7 @@ public class AlluxioCarbonFileTest {
             @Mock
             public FileStatus[] listStatus(Path var1) throws IOException {
 
-                FileStatus[] fileStatus = new FileStatus[]{new FileStatus(12L, true, 60, 120l, 180L, new Path(fileName))};
-                return fileStatus;
+                return new FileStatus[]{new FileStatus(12L, true, 60, 120l, 180L, new Path(fileName))};
             }
 
         };

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/test/java/org/apache/carbondata/core/datastore/filesystem/HDFSCarbonFileTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/datastore/filesystem/HDFSCarbonFileTest.java b/core/src/test/java/org/apache/carbondata/core/datastore/filesystem/HDFSCarbonFileTest.java
index b9c1802..5ca7fa8 100644
--- a/core/src/test/java/org/apache/carbondata/core/datastore/filesystem/HDFSCarbonFileTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/datastore/filesystem/HDFSCarbonFileTest.java
@@ -176,8 +176,7 @@ public class HDFSCarbonFileTest {
             @Mock
             public FileStatus[] listStatus(Path var1) throws IOException {
 
-                FileStatus[] fileStatus = new FileStatus[]{new FileStatus(12L, true, 60, 120l, 180L, new Path(fileName))};
-                return fileStatus;
+                return new FileStatus[]{new FileStatus(12L, true, 60, 120l, 180L, new Path(fileName))};
             }
 
         };
@@ -251,8 +250,7 @@ public class HDFSCarbonFileTest {
             @Mock
             public FileStatus[] listStatus(Path var1) throws IOException {
 
-                FileStatus fileStatus[] = new FileStatus[]{new FileStatus(12L, true, 60, 120l, 180L, new Path(fileName))};
-                return fileStatus;
+                return new FileStatus[]{new FileStatus(12L, true, 60, 120l, 180L, new Path(fileName))};
             }
 
         };
@@ -280,8 +278,7 @@ public class HDFSCarbonFileTest {
             @Mock
             public FileStatus[] listStatus(Path var1) throws IOException {
 
-                FileStatus[] fileStatus = new FileStatus[]{new FileStatus(12L, true, 60, 120l, 180L, new Path(fileName))};
-                return fileStatus;
+                return new FileStatus[]{new FileStatus(12L, true, 60, 120l, 180L, new Path(fileName))};
             }
 
         };

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/test/java/org/apache/carbondata/core/datastore/filesystem/LocalCarbonFileTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/datastore/filesystem/LocalCarbonFileTest.java b/core/src/test/java/org/apache/carbondata/core/datastore/filesystem/LocalCarbonFileTest.java
index 498f4fc..3925e9e 100644
--- a/core/src/test/java/org/apache/carbondata/core/datastore/filesystem/LocalCarbonFileTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/datastore/filesystem/LocalCarbonFileTest.java
@@ -294,8 +294,7 @@ public class LocalCarbonFileTest {
             @Mock
             public File[] listFiles(FileFilter filter) {
 
-                File[] file = new File[]{dir};
-                return file;
+                return new File[]{dir};
             }
 
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/test/java/org/apache/carbondata/core/datastore/filesystem/ViewFsCarbonFileTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/datastore/filesystem/ViewFsCarbonFileTest.java b/core/src/test/java/org/apache/carbondata/core/datastore/filesystem/ViewFsCarbonFileTest.java
index 5218043..3cb8198 100644
--- a/core/src/test/java/org/apache/carbondata/core/datastore/filesystem/ViewFsCarbonFileTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/datastore/filesystem/ViewFsCarbonFileTest.java
@@ -145,8 +145,7 @@ public class ViewFsCarbonFileTest {
             @Mock
             public FileStatus[] listStatus(Path var1) throws IOException {
 
-                FileStatus[] fileStatus = new FileStatus[]{new FileStatus(12L, true, 60, 120l, 180L, new Path(fileName))};
-                return fileStatus;
+                return new FileStatus[]{new FileStatus(12L, true, 60, 120l, 180L, new Path(fileName))};
             }
 
         };
@@ -217,8 +216,7 @@ public class ViewFsCarbonFileTest {
             @Mock
             public FileStatus[] listStatus(Path var1) throws IOException {
 
-                FileStatus[] fileStatus = new FileStatus[]{new FileStatus(12L, true, 60, 120l, 180L, new Path(fileName))};
-                return fileStatus;
+                return new FileStatus[]{new FileStatus(12L, true, 60, 120l, 180L, new Path(fileName))};
             }
 
         };

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/test/java/org/apache/carbondata/core/metadata/converter/ThriftWrapperSchemaConverterImplTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/metadata/converter/ThriftWrapperSchemaConverterImplTest.java b/core/src/test/java/org/apache/carbondata/core/metadata/converter/ThriftWrapperSchemaConverterImplTest.java
index b044b6f..e8851e0 100644
--- a/core/src/test/java/org/apache/carbondata/core/metadata/converter/ThriftWrapperSchemaConverterImplTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/metadata/converter/ThriftWrapperSchemaConverterImplTest.java
@@ -105,8 +105,7 @@ public class ThriftWrapperSchemaConverterImplTest {
       }
 
       @Mock public long getTime_stamp() {
-        long time = 1112745600000L;
-        return time;
+        return 1112745600000L;
       }
 
       @Mock public List<org.apache.carbondata.format.ColumnSchema> getAdded() {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/test/java/org/apache/carbondata/core/scan/executor/util/QueryUtilTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/scan/executor/util/QueryUtilTest.java b/core/src/test/java/org/apache/carbondata/core/scan/executor/util/QueryUtilTest.java
index 288c148..23504d3 100644
--- a/core/src/test/java/org/apache/carbondata/core/scan/executor/util/QueryUtilTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/scan/executor/util/QueryUtilTest.java
@@ -149,8 +149,7 @@ public class QueryUtilTest extends TestCase {
     int ordinal = 0;
     new MockUp<SegmentProperties>() {
       @Mock public int[][] getColumnGroups() {
-        int columnGroups[][] = { { 1, 1 }, { 2, 2 }, { 3, 3 }, { 4, 4 }, { 5, 5 } };
-        return columnGroups;
+        return new int[][] { { 1, 1 }, { 2, 2 }, { 3, 3 }, { 4, 4 }, { 5, 5 } };
       }
     };
     int actualValue = QueryUtil.getColumnGroupId(segmentProperties, ordinal);
@@ -162,8 +161,7 @@ public class QueryUtilTest extends TestCase {
     int ordinal = 1;
     new MockUp<SegmentProperties>() {
       @Mock public int[][] getColumnGroups() {
-        int columnGroups[][] = { { 1, 1 }, { 2, 2 }, { 3, 3 }, { 4, 4 }, { 5, 5 } };
-        return columnGroups;
+        return new int[][] { { 1, 1 }, { 2, 2 }, { 3, 3 }, { 4, 4 }, { 5, 5 } };
       }
     };
     int actualValue = QueryUtil.getColumnGroupId(segmentProperties, ordinal);
@@ -175,8 +173,7 @@ public class QueryUtilTest extends TestCase {
     int ordinal = 1;
     new MockUp<SegmentProperties>() {
       @Mock public int[][] getColumnGroups() {
-        int columnGroups[][] = { { 1 } };
-        return columnGroups;
+        return new int[][] { { 1 } };
       }
     };
     int actualValue = QueryUtil.getColumnGroupId(segmentProperties, ordinal);

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/core/src/test/java/org/apache/carbondata/core/util/RangeFilterProcessorTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/util/RangeFilterProcessorTest.java b/core/src/test/java/org/apache/carbondata/core/util/RangeFilterProcessorTest.java
index 2d8927b..952b7f7 100644
--- a/core/src/test/java/org/apache/carbondata/core/util/RangeFilterProcessorTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/util/RangeFilterProcessorTest.java
@@ -94,8 +94,7 @@ public class RangeFilterProcessorTest {
     colb.setDimension(empDimension);
     Expression lessThan =
         new LessThanEqualToExpression(colb, new LiteralExpression("20", DataType.STRING));
-    Expression andExp = new AndExpression(greaterThan, lessThan);
-    inputFilter = andExp;
+    inputFilter = new AndExpression(greaterThan, lessThan);
 
     Expression output = new AndExpression(new RangeExpression(
         new GreaterThanEqualToExpression(new ColumnExpression("a", DataType.STRING),
@@ -136,8 +135,7 @@ public class RangeFilterProcessorTest {
     colb.setDimension(empDimension);
     Expression lessThan =
         new LessThanEqualToExpression(colb, new LiteralExpression("05", DataType.STRING));
-    Expression andExp = new AndExpression(greaterThan, lessThan);
-    inputFilter = andExp;
+    inputFilter = new AndExpression(greaterThan, lessThan);
 
     Expression output = new AndExpression(
         new GreaterThanEqualToExpression(new ColumnExpression("a", DataType.STRING),
@@ -195,8 +193,7 @@ public class RangeFilterProcessorTest {
     Expression And1 = new AndExpression(new NotEqualsExpression(null, null), greaterThan2);
     Expression And2 = new AndExpression(And1, greaterThan1);
     Expression And3 = new AndExpression(And2, lessThan2);
-    Expression And4 = new AndExpression(And3, lessThan1);
-    inputFilter = And4;
+    inputFilter = new AndExpression(And3, lessThan1);
 
     // Build The output
 
@@ -219,14 +216,11 @@ public class RangeFilterProcessorTest {
 
     Expression Andb2 = new AndExpression(Andb1, new RangeExpression(greaterThanb1, lessThanb1));
     Expression Andb3 = new AndExpression(Andb2, new TrueExpression(null));
-    Expression Andb4 = new AndExpression(Andb3, new TrueExpression(null));
-
-    Expression output = Andb4;
 
     FilterOptimizer rangeFilterOptimizer =
         new RangeFilterOptmizer(new FilterOptimizerBasic(), inputFilter);
     rangeFilterOptimizer.optimizeFilter();
-    result = checkBothTrees(inputFilter, output);
+    result = checkBothTrees(inputFilter, new AndExpression(Andb3, new TrueExpression(null)));
     // no change
     Assert.assertTrue(result);
   }
@@ -274,8 +268,7 @@ public class RangeFilterProcessorTest {
     Expression Or1 = new OrExpression(new NotEqualsExpression(null, null), greaterThan2);
     Expression Or2 = new OrExpression(Or1, greaterThan1);
     Expression Or3 = new OrExpression(Or2, lessThan2);
-    Expression Or4 = new OrExpression(Or3, lessThan1);
-    inputFilter = Or4;
+    inputFilter = new OrExpression(Or3, lessThan1);
 
     // Build The output
 
@@ -307,13 +300,11 @@ public class RangeFilterProcessorTest {
     Expression Orb1 = new OrExpression(new NotEqualsExpression(null, null), greaterThanb2);
     Expression Orb2 = new OrExpression(Orb1, greaterThanb1);
     Expression Orb3 = new OrExpression(Orb2, lessThanb2);
-    Expression Orb4 = new OrExpression(Orb3, lessThanb1);
-    Expression output = Orb4;
 
     FilterOptimizer rangeFilterOptimizer =
         new RangeFilterOptmizer(new FilterOptimizerBasic(), inputFilter);
     rangeFilterOptimizer.optimizeFilter();
-    result = checkBothTrees(inputFilter, output);
+    result = checkBothTrees(inputFilter, new OrExpression(Orb3, lessThanb1));
     // no change
     Assert.assertTrue(result);
   }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java b/processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java
index 2ad83a4..b3d5b5c 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java
@@ -325,9 +325,8 @@ public class CarbonCompactionUtil {
     for (CarbonMeasure measure : masterSchemaMeasures) {
       updatedColumnSchemaList.add(measure.getColumnSchema());
     }
-    int[] updatedCardinality = ArrayUtils
+    return ArrayUtils
         .toPrimitive(updatedCardinalityList.toArray(new Integer[updatedCardinalityList.size()]));
-    return updatedCardinality;
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java b/processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java
index cbd5a25..2b81eec 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java
@@ -139,16 +139,13 @@ public final class CarbonDataMergerUtil {
    * @return
    */
   public static String getMergedLoadName(final String segmentToBeMerged) {
-    String firstSegmentName = segmentToBeMerged;
-    if (firstSegmentName.contains(".")) {
-      String beforeDecimal = firstSegmentName.substring(0, firstSegmentName.indexOf("."));
-      String afterDecimal = firstSegmentName.substring(firstSegmentName.indexOf(".") + 1);
+    if (segmentToBeMerged.contains(".")) {
+      String beforeDecimal = segmentToBeMerged.substring(0, segmentToBeMerged.indexOf("."));
+      String afterDecimal = segmentToBeMerged.substring(segmentToBeMerged.indexOf(".") + 1);
       int fraction = Integer.parseInt(afterDecimal) + 1;
-      String mergedSegmentName = beforeDecimal + "." + fraction;
-      return mergedSegmentName;
+      return beforeDecimal + "." + fraction;
     } else {
-      String mergeName = firstSegmentName + "." + 1;
-      return mergeName;
+      return segmentToBeMerged + "." + 1;
     }
 
   }
@@ -225,9 +222,9 @@ public final class CarbonDataMergerUtil {
 
         for (String compactedBlocks : updatedDeltaFilesList) {
           // Try to BlockName
-          String fullBlock = compactedBlocks;
-          int endIndex = fullBlock.lastIndexOf(File.separator);
-          String blkNoExt = fullBlock.substring(endIndex + 1, fullBlock.lastIndexOf("-"));
+          int endIndex = compactedBlocks.lastIndexOf(File.separator);
+          String blkNoExt =
+              compactedBlocks.substring(endIndex + 1, compactedBlocks.lastIndexOf("-"));
           blockNames.add(blkNoExt);
         }
 
@@ -421,10 +418,7 @@ public final class CarbonDataMergerUtil {
     // Check for segments which are qualified for IUD compaction.
     if (compactionType.equals(CompactionType.IUD_UPDDEL_DELTA_COMPACTION)) {
 
-      List<LoadMetadataDetails> listOfSegmentsToBeMerged =
-          identifySegmentsToBeMergedBasedOnIUD(sortedSegments, carbonLoadModel);
-
-      return listOfSegmentsToBeMerged;
+      return identifySegmentsToBeMergedBasedOnIUD(sortedSegments, carbonLoadModel);
     }
 
     // check preserve property and preserve the configured number of latest loads.
@@ -986,8 +980,7 @@ public final class CarbonDataMergerUtil {
 
     List<String> list = segmentUpdateStatusManager.getUpdateDeltaFiles(seg);
 
-    String fullBlock = blkName;
-    String[] FileParts = fullBlock.split(CarbonCommonConstants.FILE_SEPARATOR);
+    String[] FileParts = blkName.split(CarbonCommonConstants.FILE_SEPARATOR);
     String blockName = FileParts[FileParts.length - 1];
 
     for (String str : list) {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/processing/src/main/java/org/apache/carbondata/processing/merger/CompactionResultSortProcessor.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/merger/CompactionResultSortProcessor.java b/processing/src/main/java/org/apache/carbondata/processing/merger/CompactionResultSortProcessor.java
index a357c7e..63b7c10 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/merger/CompactionResultSortProcessor.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/merger/CompactionResultSortProcessor.java
@@ -343,12 +343,11 @@ public class CompactionResultSortProcessor extends AbstractResultProcessor {
    * @return
    */
   private SortParameters createSortParameters() {
-    SortParameters parameters = SortParameters
+    return SortParameters
         .createSortParameters(carbonLoadModel.getDatabaseName(), tableName, dimensionColumnCount,
             segmentProperties.getComplexDimensions().size(), measureCount, noDictionaryCount,
             carbonLoadModel.getPartitionId(), segmentId, carbonLoadModel.getTaskNo(),
             noDictionaryColMapping);
-    return parameters;
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/processing/src/main/java/org/apache/carbondata/processing/newflow/DataLoadProcessBuilder.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/newflow/DataLoadProcessBuilder.java b/processing/src/main/java/org/apache/carbondata/processing/newflow/DataLoadProcessBuilder.java
index b8b098b..7435530 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/newflow/DataLoadProcessBuilder.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/newflow/DataLoadProcessBuilder.java
@@ -83,9 +83,7 @@ public final class DataLoadProcessBuilder {
     AbstractDataLoadProcessorStep sortProcessorStep =
         new SortProcessorStepImpl(configuration, converterProcessorStep);
     // 4. Writes the sorted data in carbondata format.
-    AbstractDataLoadProcessorStep writerProcessorStep =
-        new DataWriterProcessorStepImpl(configuration, sortProcessorStep);
-    return writerProcessorStep;
+    return new DataWriterProcessorStepImpl(configuration, sortProcessorStep);
   }
 
   private AbstractDataLoadProcessorStep buildInternalForNoSort(CarbonIterator[] inputIterators,
@@ -116,9 +114,7 @@ public final class DataLoadProcessBuilder {
     AbstractDataLoadProcessorStep sortProcessorStep =
         new SortProcessorStepImpl(configuration, converterProcessorStep);
     // 4. Writes the sorted data in carbondata format.
-    AbstractDataLoadProcessorStep writerProcessorStep =
-        new DataWriterBatchProcessorStepImpl(configuration, sortProcessorStep);
-    return writerProcessorStep;
+    return new DataWriterBatchProcessorStepImpl(configuration, sortProcessorStep);
   }
 
   private AbstractDataLoadProcessorStep buildInternalForBucketing(CarbonIterator[] inputIterators,
@@ -134,9 +130,7 @@ public final class DataLoadProcessBuilder {
     AbstractDataLoadProcessorStep sortProcessorStep =
         new SortProcessorStepImpl(configuration, converterProcessorStep);
     // 4. Writes the sorted data in carbondata format.
-    AbstractDataLoadProcessorStep writerProcessorStep =
-        new DataWriterProcessorStepImpl(configuration, sortProcessorStep);
-    return writerProcessorStep;
+    return new DataWriterProcessorStepImpl(configuration, sortProcessorStep);
   }
 
   private CarbonDataLoadConfiguration createConfiguration(CarbonLoadModel loadModel,

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/processing/src/main/java/org/apache/carbondata/processing/newflow/dictionary/DictionaryServerClientDictionary.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/newflow/dictionary/DictionaryServerClientDictionary.java b/processing/src/main/java/org/apache/carbondata/processing/newflow/dictionary/DictionaryServerClientDictionary.java
index c7ff1c7..82605a5 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/newflow/dictionary/DictionaryServerClientDictionary.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/newflow/dictionary/DictionaryServerClientDictionary.java
@@ -84,7 +84,6 @@ public class DictionaryServerClientDictionary implements BiDictionary<Integer, O
 
   @Override public int size() {
     dictionaryMessage.setType(DictionaryMessageType.SIZE);
-    int size = client.getDictionary(dictionaryMessage).getDictionaryValue() + base;
-    return size;
+    return client.getDictionary(dictionaryMessage).getDictionaryValue() + base;
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/impl/ParallelReadMergeSorterWithBucketingImpl.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/impl/ParallelReadMergeSorterWithBucketingImpl.java b/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/impl/ParallelReadMergeSorterWithBucketingImpl.java
index 430bf1f..b66f4fb 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/impl/ParallelReadMergeSorterWithBucketingImpl.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/impl/ParallelReadMergeSorterWithBucketingImpl.java
@@ -135,13 +135,11 @@ public class ParallelReadMergeSorterWithBucketingImpl implements Sorter {
     // Set the data file location
     String dataFolderLocation =
         storeLocation + File.separator + CarbonCommonConstants.SORT_TEMP_FILE_LOCATION;
-    SingleThreadFinalSortFilesMerger finalMerger =
-        new SingleThreadFinalSortFilesMerger(dataFolderLocation, sortParameters.getTableName(),
+    return new SingleThreadFinalSortFilesMerger(dataFolderLocation, sortParameters.getTableName(),
             sortParameters.getDimColCount(), sortParameters.getComplexDimColCount(),
             sortParameters.getMeasureColCount(), sortParameters.getNoDictionaryCount(),
             sortParameters.getAggType(), sortParameters.getNoDictionaryDimnesionColumn(),
             this.sortParameters.getNoDictionarySortColumn());
-    return finalMerger;
   }
 
   @Override public void close() {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java b/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java
index 84aa029..cfdb69a 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java
@@ -255,8 +255,7 @@ public class UnsafeSortTempFileChunkHolder implements SortTempChunkHolder {
       prefetchRecordsProceesed++;
       returnRow = currentBuffer[bufferRowCounter++];
     } else {
-      Object[] outRow = getRowFromStream();
-      this.returnRow = outRow;
+      this.returnRow = getRowFromStream();
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/processing/src/main/java/org/apache/carbondata/processing/newflow/steps/DataConverterProcessorStepImpl.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/newflow/steps/DataConverterProcessorStepImpl.java b/processing/src/main/java/org/apache/carbondata/processing/newflow/steps/DataConverterProcessorStepImpl.java
index cc99469..2348d54 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/newflow/steps/DataConverterProcessorStepImpl.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/newflow/steps/DataConverterProcessorStepImpl.java
@@ -150,13 +150,12 @@ public class DataConverterProcessorStepImpl extends AbstractDataLoadProcessorSte
     }
     CarbonTableIdentifier identifier =
         configuration.getTableIdentifier().getCarbonTableIdentifier();
-    BadRecordsLogger badRecordsLogger = new BadRecordsLogger(identifier.getBadRecordLoggerKey(),
+    return new BadRecordsLogger(identifier.getBadRecordLoggerKey(),
         identifier.getTableName() + '_' + System.currentTimeMillis(), getBadLogStoreLocation(
         identifier.getDatabaseName() + CarbonCommonConstants.FILE_SEPARATOR + identifier
             .getTableName() + CarbonCommonConstants.FILE_SEPARATOR + configuration.getSegmentId()
             + CarbonCommonConstants.FILE_SEPARATOR + configuration.getTaskNo()),
         badRecordsLogRedirect, badRecordsLoggerEnable, badRecordConvertNullDisable, isDataLoadFail);
-    return badRecordsLogger;
   }
 
   private String getBadLogStoreLocation(String storeLocation) {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/processing/src/main/java/org/apache/carbondata/processing/newflow/steps/DataConverterProcessorWithBucketingStepImpl.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/newflow/steps/DataConverterProcessorWithBucketingStepImpl.java b/processing/src/main/java/org/apache/carbondata/processing/newflow/steps/DataConverterProcessorWithBucketingStepImpl.java
index e7b3876..300929e 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/newflow/steps/DataConverterProcessorWithBucketingStepImpl.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/newflow/steps/DataConverterProcessorWithBucketingStepImpl.java
@@ -177,12 +177,11 @@ public class DataConverterProcessorWithBucketingStepImpl extends AbstractDataLoa
     }
     CarbonTableIdentifier identifier =
         configuration.getTableIdentifier().getCarbonTableIdentifier();
-    BadRecordsLogger badRecordsLogger = new BadRecordsLogger(identifier.getBadRecordLoggerKey(),
+    return new BadRecordsLogger(identifier.getBadRecordLoggerKey(),
         identifier.getTableName() + '_' + System.currentTimeMillis(), getBadLogStoreLocation(
         identifier.getDatabaseName() + File.separator + identifier.getTableName() + File.separator
             + configuration.getTaskNo()), badRecordsLogRedirect, badRecordsLoggerEnable,
         badRecordConvertNullDisable, isDataLoadFail);
-    return badRecordsLogger;
   }
 
   private String getBadLogStoreLocation(String storeLocation) {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/processing/src/main/java/org/apache/carbondata/processing/newflow/steps/SortProcessorStepImpl.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/newflow/steps/SortProcessorStepImpl.java b/processing/src/main/java/org/apache/carbondata/processing/newflow/steps/SortProcessorStepImpl.java
index 17cc01e..08b8b73 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/newflow/steps/SortProcessorStepImpl.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/newflow/steps/SortProcessorStepImpl.java
@@ -79,8 +79,7 @@ public class SortProcessorStepImpl extends AbstractDataLoadProcessorStep {
   @Override
   public Iterator<CarbonRowBatch>[] execute() throws CarbonDataLoadingException {
     final Iterator<CarbonRowBatch>[] iterators = child.execute();
-    Iterator<CarbonRowBatch>[] sortedIterators = sorter.sort(iterators);
-    return sortedIterators;
+    return sorter.sort(iterators);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/processing/src/main/java/org/apache/carbondata/processing/sortandgroupby/sortdata/SortTempFileChunkHolder.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/sortandgroupby/sortdata/SortTempFileChunkHolder.java b/processing/src/main/java/org/apache/carbondata/processing/sortandgroupby/sortdata/SortTempFileChunkHolder.java
index 2b0b8ae..6695a5b 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/sortandgroupby/sortdata/SortTempFileChunkHolder.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/sortandgroupby/sortdata/SortTempFileChunkHolder.java
@@ -267,8 +267,7 @@ public class SortTempFileChunkHolder implements Comparable<SortTempFileChunkHold
       prefetchRecordsProceesed++;
       returnRow = currentBuffer[bufferRowCounter++];
     } else {
-      Object[] outRow = getRowFromStream();
-      this.returnRow = outRow;
+      this.returnRow = getRowFromStream();
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/processing/src/main/java/org/apache/carbondata/processing/store/CarbonFactDataHandlerModel.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/store/CarbonFactDataHandlerModel.java b/processing/src/main/java/org/apache/carbondata/processing/store/CarbonFactDataHandlerModel.java
index 75efe56..872e812 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/store/CarbonFactDataHandlerModel.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/store/CarbonFactDataHandlerModel.java
@@ -198,8 +198,6 @@ public class CarbonFactDataHandlerModel {
 
     CarbonTableIdentifier identifier =
         configuration.getTableIdentifier().getCarbonTableIdentifier();
-    CarbonTableIdentifier tableIdentifier =
-        identifier;
     boolean[] isUseInvertedIndex =
         CarbonDataProcessorUtil.getIsUseInvertedIndex(configuration.getDataFields());
 
@@ -232,11 +230,11 @@ public class CarbonFactDataHandlerModel {
     }
 
     CarbonTable carbonTable = CarbonMetadata.getInstance().getCarbonTable(
-        tableIdentifier.getDatabaseName() + CarbonCommonConstants.UNDERSCORE + tableIdentifier
+        identifier.getDatabaseName() + CarbonCommonConstants.UNDERSCORE + identifier
             .getTableName());
     List<ColumnSchema> wrapperColumnSchema = CarbonUtil
-        .getColumnSchemaList(carbonTable.getDimensionByTableName(tableIdentifier.getTableName()),
-            carbonTable.getMeasureByTableName(tableIdentifier.getTableName()));
+        .getColumnSchemaList(carbonTable.getDimensionByTableName(identifier.getTableName()),
+            carbonTable.getMeasureByTableName(identifier.getTableName()));
     int[] colCardinality =
         CarbonUtil.getFormattedCardinality(dimLensWithComplex, wrapperColumnSchema);
     SegmentProperties segmentProperties =
@@ -387,10 +385,8 @@ public class CarbonFactDataHandlerModel {
             .getTableName());
     CarbonTablePath carbonTablePath =
         CarbonStorePath.getCarbonTablePath(carbonStorePath, carbonTable.getCarbonTableIdentifier());
-    String carbonDataDirectoryPath = carbonTablePath
-        .getCarbonDataDirectoryPath(configuration.getPartitionId(),
-            configuration.getSegmentId() + "");
-    return carbonDataDirectoryPath;
+    return carbonTablePath.getCarbonDataDirectoryPath(configuration.getPartitionId(),
+        configuration.getSegmentId() + "");
   }
 
   public int[] getColCardinality() {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java b/processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java
index 178b43b..6eaf9a7 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java
@@ -207,8 +207,7 @@ public final class CarbonDataProcessorUtil {
         CarbonStorePath.getCarbonTablePath(baseStorePath, carbonTable.getCarbonTableIdentifier());
     String carbonDataDirectoryPath =
         carbonTablePath.getCarbonDataDirectoryPath(partitionId, segmentId + "");
-    String localDataLoadFolderLocation = carbonDataDirectoryPath + File.separator + taskId;
-    return localDataLoadFolderLocation;
+    return carbonDataDirectoryPath + File.separator + taskId;
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/47b2fdd9/processing/src/main/java/org/apache/carbondata/processing/util/NonDictionaryUtil.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/util/NonDictionaryUtil.java b/processing/src/main/java/org/apache/carbondata/processing/util/NonDictionaryUtil.java
index 54b4951..d6f992c 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/util/NonDictionaryUtil.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/util/NonDictionaryUtil.java
@@ -404,8 +404,7 @@ public class NonDictionaryUtil {
       builder.append(CarbonCommonConstants.COMA_SPC_CHARACTER);
     }
     int lastIndex = builder.lastIndexOf(CarbonCommonConstants.COMA_SPC_CHARACTER);
-    String str = -1 != lastIndex ? builder.substring(0, lastIndex) : builder.toString();
-    return str;
+    return -1 != lastIndex ? builder.substring(0, lastIndex) : builder.toString();
   }
 
   /**


Mime
View raw message