ajantha-bhat commented on a change in pull request #3696: [HOTFIX] Fix Repeated 
access to getSegmentProperties
URL: https://github.com/apache/carbondata/pull/3696#discussion_r403857254
 
 

 ##########
 File path: 
core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletIndexFactory.java
 ##########
 @@ -653,9 +653,13 @@ public SegmentProperties 
getSegmentPropertiesFromDataMap(Index coarseGrainIndex)
       throws IOException {
     List<Blocklet> blocklets = new ArrayList<>();
     List<CoarseGrainIndex> dataMaps = getIndexes(segment, partitions);
+    if (dataMaps.size() == 0 || dataMaps == null) {
 
 Review comment:
   dataMaps cannot be null from getIndexes, it can be empty.
   **So, remove it.**
   
   Also If we checking null, it has to be the first condition of || else we can 
get NPE for null scenarios

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to