com.clickzetta.platform.bulkload.RowAppenderFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clickzetta-java Show documentation
Show all versions of clickzetta-java Show documentation
The java SDK for clickzetta's Lakehouse
package com.clickzetta.platform.bulkload;
import com.clickzetta.platform.arrow.ArrowTable;
import org.apache.iceberg.io.OutputFile;
import java.io.IOException;
class RowAppenderFactory {
public static RowAppender create(OutputFile outputFile,
ArrowTable table,
FileFormatType fileFormat) throws IOException {
if (fileFormat == FileFormatType.PARQUET) {
return new ParquetRowAppender(outputFile, table);
} else if (fileFormat == FileFormatType.ARROW) {
return new ArrowRowAppender(outputFile.create(), table);
} else {
throw new IllegalArgumentException("Unsupported file format: " + fileFormat.name());
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy