private void generateLogicalOrderedColumnIds() {
      if (acidStructColumnId != null) {
        // ACID case - no op
        LOG.debug("Not generating logical ordered column IDs for an ACID file read.");
        return;
      }
      adjustPhysicalColumnIds(evolution);
      // Logical ordered column ids rely on schema names, thus force positional evolution must be off
      if (jobConf.getBoolean(OrcConf.FORCE_POSITIONAL_EVOLUTION.getHiveConfName(), true)) {
        logicalOrderedColumnIds = filePhysicalColumnIds;
        LOG.debug("Not generating logical ordered column IDs by column name matching, as it is not possible with " +
            "orc.force.positional.evolution turned on.");
        return;
      }
      logicalOrderedColumnIds = new LinkedList<>();
      Map<Integer, String> fileSchemaMap = new HashMap<>();
      Map<String, Integer> readSchemaMap = new HashMap<>();
      int order = 0;
      for (String fieldName : evolution.getFileSchema().getFieldNames()) {
        fileSchemaMap.put(order++, fieldName);
      }
      order = 0;
      for (String fieldName : evolution.getReaderSchema().getFieldNames()) {
        readSchemaMap.put(fieldName, order++);
      }
      for (int physicalId : filePhysicalColumnIds) {
        Integer id = readSchemaMap.get(fileSchemaMap.get(physicalId));
        if (id != null) {
          logicalOrderedColumnIds.add(id);
        }
      }
      LOG.debug("Logical ordered column IDs generated. Result: {}, fileSchemaMap: {}, readSchemaMap: {}",
          logicalOrderedColumnIds, fileSchemaMap, readSchemaMap);
    }
LLAP IO always returns the column vectors in the order as they are seen in the file.
To support logical column reordering, we need to do a matching between file and read schemas.
(this only supports one level of schema reordering, not within complex types, also not supported for ORC ACID)
llap-server/src/java/org/apache/hadoop/hive/llap/io/api/impl/LlapRecordReader.java