All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.clickzetta.platform.bulkload.RowAppenderFactory Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
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