amoro-format-mixed/amoro-mixed-spark/v3.5/amoro-mixed-spark-3.5/src/main/java/org/apache/amoro/spark/reader/SparkScanBuilder.java [80:111]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  private Schema lazySchemaWithRowIdent() {
    if (schema == null) {
      if (requestedProjection != null) {
        // the projection should include all columns that will be returned,
        // including those only used in filters
        this.schema =
            SparkSchemaUtil.prune(
                table.schema(), requestedProjection, filterExpression(), caseSensitive);
      } else {
        this.schema = table.schema();
      }
    }

    UnkeyedTable icebergTable;
    if (table.isUnkeyedTable()) {
      icebergTable = table.asUnkeyedTable();
    } else {
      icebergTable = table.asKeyedTable().baseTable();
    }
    // metadata columns
    List<Types.NestedField> fields =
        metaColumns.stream()
            .distinct()
            .map(column -> MetadataColumns.metadataColumn(icebergTable, column))
            .collect(Collectors.toList());
    if (fields.size() == 1) {
      return schema;
    }
    Schema meta = new Schema(fields);

    return TypeUtil.join(schema, meta);
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



amoro-format-mixed/amoro-mixed-spark/v3.2/amoro-mixed-spark-3.2/src/main/java/org/apache/amoro/spark/reader/SparkScanBuilder.java [79:110]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  private Schema lazySchemaWithRowIdent() {
    if (schema == null) {
      if (requestedProjection != null) {
        // the projection should include all columns that will be returned,
        // including those only used in filters
        this.schema =
            SparkSchemaUtil.prune(
                table.schema(), requestedProjection, filterExpression(), caseSensitive);
      } else {
        this.schema = table.schema();
      }
    }

    UnkeyedTable icebergTable;
    if (table.isUnkeyedTable()) {
      icebergTable = table.asUnkeyedTable();
    } else {
      icebergTable = table.asKeyedTable().baseTable();
    }
    // metadata columns
    List<Types.NestedField> fields =
        metaColumns.stream()
            .distinct()
            .map(column -> MetadataColumns.metadataColumn(icebergTable, column))
            .collect(Collectors.toList());
    if (fields.size() == 1) {
      return schema;
    }
    Schema meta = new Schema(fields);

    return TypeUtil.join(schema, meta);
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



amoro-format-mixed/amoro-mixed-spark/v3.3/amoro-mixed-spark-3.3/src/main/java/org/apache/amoro/spark/reader/SparkScanBuilder.java [80:111]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  private Schema lazySchemaWithRowIdent() {
    if (schema == null) {
      if (requestedProjection != null) {
        // the projection should include all columns that will be returned,
        // including those only used in filters
        this.schema =
            SparkSchemaUtil.prune(
                table.schema(), requestedProjection, filterExpression(), caseSensitive);
      } else {
        this.schema = table.schema();
      }
    }

    UnkeyedTable icebergTable;
    if (table.isUnkeyedTable()) {
      icebergTable = table.asUnkeyedTable();
    } else {
      icebergTable = table.asKeyedTable().baseTable();
    }
    // metadata columns
    List<Types.NestedField> fields =
        metaColumns.stream()
            .distinct()
            .map(column -> MetadataColumns.metadataColumn(icebergTable, column))
            .collect(Collectors.toList());
    if (fields.size() == 1) {
      return schema;
    }
    Schema meta = new Schema(fields);

    return TypeUtil.join(schema, meta);
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



