leaves12138 commented on code in PR #6340: URL: https://github.com/apache/paimon/pull/6340#discussion_r2381685533
########## paimon-core/src/main/java/org/apache/paimon/append/RollingFileWriterWithBlob.java: ########## @@ -0,0 +1,408 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.paimon.append; + +import org.apache.paimon.data.InternalRow; +import org.apache.paimon.fileindex.FileIndexOptions; +import org.apache.paimon.format.FileFormat; +import org.apache.paimon.format.blob.BlobFileFormat; +import org.apache.paimon.fs.FileIO; +import org.apache.paimon.io.BundleRecords; +import org.apache.paimon.io.DataFileMeta; +import org.apache.paimon.io.DataFilePathFactory; +import org.apache.paimon.io.RollingFileWriter; +import org.apache.paimon.io.RollingFileWriterImpl; +import org.apache.paimon.io.RowDataFileWriter; +import org.apache.paimon.io.SingleFileWriter; +import org.apache.paimon.io.SingleFileWriter.AbortExecutor; +import org.apache.paimon.manifest.FileSource; +import org.apache.paimon.statistics.NoneSimpleColStatsCollector; +import org.apache.paimon.statistics.SimpleColStatsCollector; +import org.apache.paimon.types.RowType; +import org.apache.paimon.utils.LongCounter; +import org.apache.paimon.utils.Pair; +import org.apache.paimon.utils.Preconditions; +import org.apache.paimon.utils.StatsCollectorFactories; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.function.Supplier; + +import static org.apache.paimon.utils.Preconditions.checkArgument; + +/** + * A rolling file writer that handles both normal data and blob data. This writer creates separate + * files for normal columns and blob columns, managing their lifecycle and ensuring consistency + * between them. + */ +public class RollingFileWriterWithBlob implements RollingFileWriter<InternalRow, DataFileMeta> { Review Comment: OK ########## paimon-core/src/main/java/org/apache/paimon/append/RollingBlobFileWriter.java: ########## @@ -0,0 +1,408 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.paimon.append; + +import org.apache.paimon.data.InternalRow; +import org.apache.paimon.fileindex.FileIndexOptions; +import org.apache.paimon.format.FileFormat; +import org.apache.paimon.format.blob.BlobFileFormat; +import org.apache.paimon.fs.FileIO; +import org.apache.paimon.io.BundleRecords; +import org.apache.paimon.io.DataFileMeta; +import org.apache.paimon.io.DataFilePathFactory; +import org.apache.paimon.io.RollingFileWriter; +import org.apache.paimon.io.RollingFileWriterImpl; +import org.apache.paimon.io.RowDataFileWriter; +import org.apache.paimon.io.SingleFileWriter; +import org.apache.paimon.io.SingleFileWriter.AbortExecutor; +import org.apache.paimon.manifest.FileSource; +import org.apache.paimon.statistics.NoneSimpleColStatsCollector; +import org.apache.paimon.statistics.SimpleColStatsCollector; +import org.apache.paimon.types.RowType; +import org.apache.paimon.utils.LongCounter; +import org.apache.paimon.utils.Pair; +import org.apache.paimon.utils.Preconditions; +import org.apache.paimon.utils.StatsCollectorFactories; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.function.Supplier; + +import static org.apache.paimon.utils.Preconditions.checkArgument; + +/** + * A rolling file writer that handles both normal data and blob data. This writer creates separate + * files for normal columns and blob columns, managing their lifecycle and ensuring consistency + * between them. Review Comment: OK -- 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]
