Skip to content

Commit

Permalink
Dataset Java API: Add CSV support
Browse files Browse the repository at this point in the history
  • Loading branch information
zhztheplayer committed Feb 8, 2022
1 parent 5cd0394 commit 75bea9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cpp/src/jni/dataset/jni_wrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ arrow::Result<std::shared_ptr<arrow::dataset::FileFormat>> GetFileFormat(
switch (file_format_id) {
case 0:
return std::make_shared<arrow::dataset::ParquetFileFormat>();
case 1:
return std::make_shared<arrow::dataset::CsvFileFormat>();
default:
std::string error_message =
"illegal file format id: " + std::to_string(file_format_id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
*/
public enum FileFormat {
PARQUET(0),
CSV(1),
NONE(-1);

private int id;
Expand Down

0 comments on commit 75bea9a

Please sign in to comment.