xubo245 commented on a change in pull request #3795:
URL: https://github.com/apache/carbondata/pull/3795#discussion_r443917288



##########
File path: 
core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletIndexFactory.java
##########
@@ -352,9 +352,12 @@ private void modifyColumnSchemaForSortColumn(ColumnSchema 
columnSchema, boolean
       throws IOException {
     SegmentBlockIndexInfo segmentBlockIndexInfo = 
segmentMap.get(segment.getSegmentNo());
     Set<TableBlockIndexUniqueIdentifier> tableBlockIndexUniqueIdentifiers = 
null;
-    if (null != segmentBlockIndexInfo && null != 
segmentBlockIndexInfo.getSegmentMetaDataInfo()) {
-      segment.setSegmentMetaDataInfo(
-          segmentMap.get(segment.getSegmentNo()).getSegmentMetaDataInfo());
+    if (null != segmentBlockIndexInfo
+            && 
segmentBlockIndexInfo.getTableBlockIndexUniqueIdentifiers().size() > 0) {

Review comment:
       Suggestion:use CollectionUtils.isNotEmpty() to judge 
segmentBlockIndexInfo.getTableBlockIndexUniqueIdentifiers(), isNotEmpty include 
judge null




----------------------------------------------------------------
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:
[email protected]


Reply via email to