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

Function MakeLotsOfCsvColumns

cpp/src/arrow/csv/parser_test.cc:838–854  ·  view source on GitHub ↗

Generate test data with the given number of columns.

Source from the content-addressed store, hash-verified

836
837// Generate test data with the given number of columns.
838std::string MakeLotsOfCsvColumns(int32_t num_columns) {
839 std::string values, header;
840 header.reserve(num_columns * 10);
841 values.reserve(num_columns * 10);
842 for (int x = 0; x < num_columns; x++) {
843 if (x != 0) {
844 header += ",";
845 values += ",";
846 }
847 header += "c" + std::to_string(x);
848 values += std::to_string(x);
849 }
850
851 header += "\n";
852 values += "\n";
853 return MakeCSVData({header, values});
854}
855
856TEST(BlockParser, LotsOfColumns) {
857 auto options = ParseOptions::Defaults();

Callers 1

TESTFunction · 0.85

Calls 3

to_stringFunction · 0.85
MakeCSVDataFunction · 0.85
reserveMethod · 0.45

Tested by

no test coverage detected