Source:
<code>public static List<ColumnMapping> buildColumnMappings( List<HivePartitionKey> partitionKeys, List<HiveColumnHandle> columns, List<HiveColumnHandle> requiredInterimColumns, Map<Integer, Column> partitionSchemaDifference, Path path, OptionalInt bucketNumber) { Map<String, HivePartitionKey> partitionKeysByName = uniqueIndex(partitionKeys, HivePartitionKey::getName); int regularIndex = 0; Set<Integer> regularColumnIndices = new HashSet<>(); ImmutableList.Builder<ColumnMapping> columnMappings = ImmutableList.builder(); for (HiveColumnHandle column : columns) { Optional<Column> partitionColumn = Optional.ofNullable(partitionSchemaDifference.get(column.getHiveColumnIndex())); Optional<HiveType> coerceFrom = Optional.empty(); if (partitionColumn.isPresent() && !partitionColumn.get().getType().equals(column.getHiveType())) { coerceFrom = Optional.of(partitionColumn.get().getType()); } if (column.getColumnType() == REGULAR) { checkArgument(regularColumnIndices.add(column.getHiveColumnIndex()), "duplicate hiveColumnIndex in columns list"); <START> columnMappings.add(regular(column, regularIndex, coerceFrom)); <END> regularIndex++; } else { columnMappings.add(prefilled( column, getPrefilledColumnValue(column, partitionKeysByName.get(column.getName()), path, bucketNumber), coerceFrom)); } } for (HiveColumnHandle column : requiredInterimColumns) { checkArgument(column.getColumnType() == REGULAR); if (regularColumnIndices.contains(column.getHiveColumnIndex())) { continue; } columnMappings.add(interim(column, regularIndex)); regularIndex++; } return columnMappings.build(); }</code><technical_language>I @rschlussel decide this variable named coercionFrom coerceFrom</technical_language>

Target:
public static List<ColumnMapping> buildColumnMappings( List<HivePartitionKey> partitionKeys, List<HiveColumnHandle> columns, List<HiveColumnHandle> requiredInterimColumns, Map<Integer, Column> partitionSchemaDifference, Path path, OptionalInt bucketNumber) { Map<String, HivePartitionKey> partitionKeysByName = uniqueIndex(partitionKeys, HivePartitionKey::getName); int regularIndex = 0; Set<Integer> regularColumnIndices = new HashSet<>(); ImmutableList.Builder<ColumnMapping> columnMappings = ImmutableList.builder(); for (HiveColumnHandle column : columns) { Optional<Column> partitionColumn = Optional.ofNullable(partitionSchemaDifference.get(column.getHiveColumnIndex())); Optional<HiveType> coercionFrom = Optional.empty(); if (partitionColumn.isPresent() && !partitionColumn.get().getType().equals(column.getHiveType())) { coercionFrom = Optional.of(partitionColumn.get().getType()); } if (column.getColumnType() == REGULAR) { checkArgument(regularColumnIndices.add(column.getHiveColumnIndex()), "duplicate hiveColumnIndex in columns list"); columnMappings.add(regular(column, regularIndex, coercionFrom)); regularIndex++; } else { columnMappings.add(prefilled( column, getPrefilledColumnValue(column, partitionKeysByName.get(column.getName()), path, bucketNumber), coercionFrom)); } } for (HiveColumnHandle column : requiredInterimColumns) { checkArgument(column.getColumnType() == REGULAR); if (regularColumnIndices.contains(column.getHiveColumnIndex())) { continue; } columnMappings.add(interim(column, regularIndex)); regularIndex++; } return columnMappings.build(); }