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

Function BuildFromExamples

cpp/src/arrow/csv/converter_benchmark.cc:40–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38::arrow::BenchmarkMemoryTracker memory_tracker;
39
40static std::shared_ptr<BlockParser> BuildFromExamples(
41 const std::vector<std::string>& base_rows, int32_t num_rows) {
42 std::vector<std::string> rows;
43 for (int32_t i = 0; i < num_rows; ++i) {
44 rows.push_back(base_rows[i % base_rows.size()]);
45 }
46
47 std::shared_ptr<BlockParser> result;
48 MakeCSVParser(rows, ParseOptions::Defaults(), -1, memory_tracker.memory_pool(),
49 &result);
50 return result;
51}
52
53static std::shared_ptr<BlockParser> BuildInt64Data(int32_t num_rows) {
54 const std::vector<std::string> base_rows = {"123\n", "4\n", "-317005557\n",

Callers 5

BuildInt64DataFunction · 0.85
BuildFloatDataFunction · 0.85
BuildDecimal128DataFunction · 0.85
BuildISO8601DataFunction · 0.85
BuildStrptimeDataFunction · 0.85

Calls 5

MakeCSVParserFunction · 0.85
push_backMethod · 0.80
DefaultsFunction · 0.50
sizeMethod · 0.45
memory_poolMethod · 0.45

Tested by

no test coverage detected