|
22 | 22 | import org.apache.paimon.casting.CastExecutors; |
23 | 23 | import org.apache.paimon.data.BinaryRow; |
24 | 24 | import org.apache.paimon.data.BinaryString; |
| 25 | +import org.apache.paimon.data.GenericArray; |
25 | 26 | import org.apache.paimon.data.GenericRow; |
26 | 27 | import org.apache.paimon.data.InternalArray; |
27 | 28 | import org.apache.paimon.data.InternalRow; |
@@ -117,7 +118,9 @@ public class FilesTable implements ReadonlyTable { |
117 | 118 | new DataField(14, "max_sequence_number", new BigIntType(true)), |
118 | 119 | new DataField(15, "creation_time", DataTypes.TIMESTAMP_MILLIS()), |
119 | 120 | new DataField(16, "deleteRowCount", DataTypes.BIGINT()), |
120 | | - new DataField(17, "file_source", DataTypes.STRING()))); |
| 121 | + new DataField(17, "file_source", DataTypes.STRING()), |
| 122 | + new DataField(18, "first_row_id", DataTypes.BIGINT()), |
| 123 | + new DataField(19, "write_cols", DataTypes.ARRAY(DataTypes.STRING())))); |
121 | 124 |
|
122 | 125 | private final FileStoreTable storeTable; |
123 | 126 |
|
@@ -435,7 +438,16 @@ private LazyGenericRow toRow( |
435 | 438 | () -> file.deleteRowCount().orElse(null), |
436 | 439 | () -> |
437 | 440 | BinaryString.fromString( |
438 | | - file.fileSource().map(FileSource::toString).orElse(null)) |
| 441 | + file.fileSource().map(FileSource::toString).orElse(null)), |
| 442 | + file::firstRowId, |
| 443 | + () -> { |
| 444 | + List<String> writeCols = file.writeCols(); |
| 445 | + if (writeCols == null) { |
| 446 | + return null; |
| 447 | + } |
| 448 | + return new GenericArray( |
| 449 | + writeCols.stream().map(BinaryString::fromString).toArray()); |
| 450 | + }, |
439 | 451 | }; |
440 | 452 |
|
441 | 453 | return new LazyGenericRow(fields); |
|
0 commit comments