JingsongLi commented on code in PR #7932:
URL: https://github.com/apache/paimon/pull/7932#discussion_r3287031460
##########
paimon-core/src/main/java/org/apache/paimon/append/dataevolution/DataEvolutionCompactTask.java:
##########
@@ -165,6 +184,207 @@ public CommitMessage doCompact(FileStoreTable table,
String commitUser) throws E
partition, 0, null, DataIncrement.emptyIncrement(),
compactIncrement);
}
+ private CommitMessage doCompactBlobFiles(FileStoreTable table, String
commitUser)
+ throws Exception {
+ CoreOptions options = table.coreOptions();
+ List<DataFileMeta> sortedCompactBefore =
sortedByFirstRowId(compactBefore);
+ DataField blobField = blobField(table, options, sortedCompactBefore);
+ checkRowIdsContinuous(sortedCompactBefore);
+ checkArgument(
+ sortedCompactBefore.size() > 1,
+ "Blob compaction task %s should contain at least two files to
compact.",
+ this);
+
+ RowType blobWriteType = new
RowType(Collections.singletonList(blobField));
+
+ AppendOnlyFileStore store = (AppendOnlyFileStore) table.store();
+ DataFilePathFactory pathFactory =
+ store.pathFactory().createDataFilePathFactory(partition, 0);
+
+ DataSplit dataSplit =
+ DataSplit.builder()
+ .withPartition(partition)
+ .withBucket(0)
+ .withDataFiles(sortedCompactBefore)
+ .withBucketPath(pathFactory.parent().toString())
+ .rawConvertible(false)
+ .build();
+ RecordReader<InternalRow> reader =
+
store.newDataEvolutionRead().withReadType(blobWriteType).createReader(dataSplit);
Review Comment:
You should use `blob-as-descriptor` to read blob.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]