Github user akashrn5 commented on a diff in the pull request: https://github.com/apache/carbondata/pull/2882#discussion_r230637603 --- Diff: tools/cli/src/main/java/org/apache/carbondata/tool/DataSummary.java --- @@ -311,26 +309,39 @@ private void printColumnStats(String columnName) throws IOException, MemoryExcep max = new String(blockletMax, Charset.forName(DEFAULT_CHARSET)); } } else { - minPercent = String.format("%.1f", blocklet.getColumnChunk().getMinPercentage() * 100); - maxPercent = String.format("%.1f", blocklet.getColumnChunk().getMaxPercentage() * 100); + // for complex columns min and max and percentage + if (blocklet.getColumnChunk().column.getColumnName().contains(".val") || + blocklet.getColumnChunk().column.getColumnName().contains(".")) { + minPercent = "NA"; + maxPercent = "NA"; + } else { + minPercent = + String.format("%.1f", Math.abs(blocklet.getColumnChunk().getMinPercentage() * 100)); + maxPercent = + String.format("%.1f", Math.abs(blocklet.getColumnChunk().getMaxPercentage() * 100)); + } DataFile.ColumnChunk columnChunk = blocklet.columnChunk; - if (columnChunk.column.isDimensionColumn() && DataTypeUtil + // need to consider no dictionary complex column + if (columnChunk.column.hasEncoding(Encoding.DICTIONARY) || blocklet + .getColumnChunk().column.getColumnName().contains(".val") || blocklet --- End diff -- can have a method which tells the column is complex column based on name, we already have method which tells the column by datatype, and for dictionary include and complex type, togetther no need to check, because again for child columns need to have other method, as we cant give child columns in dictionary
---