private static List<Integer> applyProjection(
      ColumnHandle expectedColumnHandle, ColumnHandle readColumnHandle) {
    IcebergColumnHandle expectedColumn = (IcebergColumnHandle) expectedColumnHandle;
    IcebergColumnHandle readColumn = (IcebergColumnHandle) readColumnHandle;
    checkState(readColumn.isBaseColumn(), "Read column path must be a base column");

    ImmutableList.Builder<Integer> dereferenceChain = ImmutableList.builder();
    ColumnIdentity columnIdentity = readColumn.getColumnIdentity();
    for (Integer fieldId : expectedColumn.getPath()) {
      ColumnIdentity nextChild = columnIdentity.getChildByFieldId(fieldId);
      dereferenceChain.add(columnIdentity.getChildIndexByFieldId(fieldId));
      columnIdentity = nextChild;
    }

    return dereferenceChain.build();
  }
Gets the index based dereference chain to get from the readColumnHandle to the
expectedColumnHandle
amoro-format-mixed/amoro-mixed-trino/src/main/java/org/apache/amoro/trino/unkeyed/IcebergPageSourceProvider.java