MCPcopy Create free account
hub / github.com/apache/arrow / parquet___ArrowWriterProperties___create

Function parquet___ArrowWriterProperties___create

r/src/parquet.cpp:212–230  ·  view source on GitHub ↗

[[parquet::export]]

Source from the content-addressed store, hash-verified

210
211// [[parquet::export]]
212std::shared_ptr<parquet::ArrowWriterProperties> parquet___ArrowWriterProperties___create(
213 bool allow_truncated_timestamps, bool use_deprecated_int96_timestamps,
214 int timestamp_unit) {
215 auto builder = std::make_shared<parquet::ArrowWriterPropertiesBuilder>();
216 builder->store_schema();
217
218 if (allow_truncated_timestamps) {
219 builder->allow_truncated_timestamps();
220 }
221 if (use_deprecated_int96_timestamps) {
222 builder->enable_deprecated_int96_timestamps();
223 }
224 if (timestamp_unit > -1) {
225 // -1 is passed in for NULL/default
226 builder->coerce_timestamps(static_cast<arrow::TimeUnit::type>(timestamp_unit));
227 }
228
229 return builder->build();
230}
231
232// [[parquet::export]]
233std::shared_ptr<parquet::WriterPropertiesBuilder>

Calls 5

store_schemaMethod · 0.80
coerce_timestampsMethod · 0.80
buildMethod · 0.45

Tested by

no test coverage detected