public AbstractDetailQueryResultIterator(
     List<BlockExecutionInfo> infos,
     QueryExecutorProperties executerProperties,
     QueryModel queryModel,
     InternalQueryExecutor queryExecutor) {
   int recordSize = 0;
   String defaultInMemoryRecordsSize =
       CarbonProperties.getInstance().getProperty(CarbonCommonConstants.INMEMORY_REOCRD_SIZE);
   if (null != defaultInMemoryRecordsSize) {
     try {
       recordSize = Integer.parseInt(defaultInMemoryRecordsSize);
     } catch (NumberFormatException ne) {
       LOGGER.error("Invalid inmemory records size. Using default value");
       recordSize = CarbonCommonConstants.INMEMORY_REOCRD_SIZE_DEFAULT;
     }
   }
   this.numberOfCores =
       recordSize
           / Integer.parseInt(
               CarbonProperties.getInstance()
                   .getProperty(
                       CarbonCommonConstants.BLOCKLET_SIZE,
                       CarbonCommonConstants.BLOCKLET_SIZE_DEFAULT_VAL));
   if (numberOfCores == 0) {
     numberOfCores++;
   }
   executor = queryExecutor;
   this.blockExecutionInfos = infos;
   this.blockIndexToBeExecuted = new int[(int) numberOfCores];
   intialiseInfos();
 }
  @Override
  public void readFields(DataInput in) throws IOException {

    int sizeLoc = in.readInt();
    for (int i = 0; i < sizeLoc; i++) {
      byte[] b = new byte[in.readInt()];
      in.readFully(b);
      locations.add(new String(b, Charset.defaultCharset()));
    }

    byte[] buf = new byte[in.readInt()];
    in.readFully(buf);
    ByteArrayInputStream bis = new ByteArrayInputStream(buf);
    ObjectInputStream ois = new ObjectInputStream(bis);
    try {
      partition = (Partition) ois.readObject();
    } catch (ClassNotFoundException e) {
      LOGGER.error(e, e.getMessage());
    }
    ois.close();
  }