@Override public List<CarbonDictionaryColumnMetaChunk> read() throws IOException {
  List<CarbonDictionaryColumnMetaChunk> dictionaryMetaChunks=new ArrayList<CarbonDictionaryColumnMetaChunk>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
  CarbonDictionaryColumnMetaChunk columnMetaChunk=null;
  ColumnDictionaryChunkMeta dictionaryChunkMeta=null;
  openThriftReader();
  while (dictionaryMetadataFileReader.hasNext()) {
    dictionaryChunkMeta=(ColumnDictionaryChunkMeta)dictionaryMetadataFileReader.read();
    columnMetaChunk=getNewInstanceOfCarbonDictionaryColumnMetaChunk(dictionaryChunkMeta);
    dictionaryMetaChunks.add(columnMetaChunk);
  }
  return dictionaryMetaChunks;
}

@ Override public List < CarbonDictionaryColumnMetaChunk > read ( ) throws IOException { List < CarbonDictionaryColumnMetaChunk > dictionaryMetaChunks = new ArrayList < CarbonDictionaryColumnMetaChunk > ( CarbonCommonConstants . DEFAULT_COLLECTION_SIZE ) ; CarbonDictionaryColumnMetaChunk columnMetaChunk = null ; ColumnDictionaryChunkMeta dictionaryChunkMeta = null ; openThriftReader ( ) ; while ( dictionaryMetadataFileReader . hasNext ( ) ) { dictionaryChunkMeta = ( ColumnDictionaryChunkMeta ) dictionaryMetadataFileReader . read ( ) ; columnMetaChunk = getNewInstanceOfCarbonDictionaryColumnMetaChunk ( dictionaryChunkMeta ) ; dictionaryMetaChunks . add ( columnMetaChunk ) ; } return dictionaryMetaChunks ; }
this method will be used to read complete metadata file . applicable scenarios : 1 . query execution . whenever a query is executed then to read the dictionary file and define the query scope first dictionary metadata has to be read first . 2 . if dictionary file is read using start and end offset then using this meta list we can count the total number of dictionary chunks present between the 2 offsets
