66 static void appendOrThrow(
const arrow::Status& status,
const std::string& column);
78 template <
typename BuilderT>
79 static std::shared_ptr<arrow::Array> finishArray(BuilderT& builder,
const std::string& name)
81 std::shared_ptr<arrow::Array> array;
82 auto status = builder.Finish(&array);
85 throw_finish_error_(name, status.ToString());
106 static void writeTable(
const std::shared_ptr<arrow::Table>& table,
const String& filename,
107 int64_t row_group_size = 262144);
120 static std::shared_ptr<arrow::Table> readTable(
const String& filename);
126 static std::shared_ptr<arrow::Table> readTable(
const std::shared_ptr<arrow::io::RandomAccessFile>& infile);
145 static std::shared_ptr<arrow::Array> getColumn(
const std::shared_ptr<arrow::Table>& table,
146 const std::string& name);
158 static std::shared_ptr<arrow::Array> getOptionalColumn(
const std::shared_ptr<arrow::Table>& table,
159 const std::string& name);
182 static int64_t getInt64(
const std::shared_ptr<arrow::Array>& array, int64_t row,
183 int64_t default_value,
bool allow_null);
200 static double getDouble(
const std::shared_ptr<arrow::Array>& array, int64_t row,
201 double default_value,
bool allow_null);
218 static bool getBool(
const std::shared_ptr<arrow::Array>& array, int64_t row,
219 bool default_value,
bool allow_null);
233 static std::string getString(
const std::shared_ptr<arrow::Array>& array, int64_t row);
247 static std::vector<std::string> getStringList(
const std::shared_ptr<arrow::Array>& array, int64_t row);
262 static std::string jsonEscape(
const String& input);
268 static int64_t rowCount(
const String& filename);
277 static void throw_finish_error_(
const std::string& name,
const std::string& error);
Shared utilities for reading, writing, and packaging Parquet-based file formats.
Definition ParquetFile.h:50