private static OrcColumn setMissingFieldIds(
      OrcColumn column, NameMapping nameMapping, List<String> qualifiedPath) {
    MappedField mappedField = nameMapping.find(qualifiedPath);

    ImmutableMap.Builder<String, String> attributes =
        ImmutableMap.<String, String>builder().putAll(column.getAttributes());
    if (mappedField != null && mappedField.id() != null) {
      attributes.put(ORC_ICEBERG_ID_KEY, String.valueOf(mappedField.id()));
    }

    return new OrcColumn(
        column.getPath(),
        column.getColumnId(),
        column.getColumnName(),
        column.getColumnType(),
        column.getOrcDataSourceId(),
        column.getNestedColumns().stream()
            .map(
                nestedColumn -> {
                  ImmutableList.Builder<String> nextQualifiedPath =
                      ImmutableList.<String>builder().addAll(qualifiedPath);
                  if (column.getColumnType() == OrcType.OrcTypeKind.LIST) {
                    // The Trino ORC reader uses "item" for list element names, but the NameMapper
                    // expects "element"
                    nextQualifiedPath.add("element");
                  } else {
                    nextQualifiedPath.add(nestedColumn.getColumnName());
                  }
                  return setMissingFieldIds(nestedColumn, nameMapping, nextQualifiedPath.build());
                })
            .collect(toImmutableList()),
        attributes.buildOrThrow());
  }
Extend IcebergPageSourceProvider to provider idToConstant that the map of columns id to constant
value
amoro-format-mixed/amoro-mixed-trino/src/main/java/org/apache/amoro/trino/unkeyed/IcebergPageSourceProvider.java