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

Function MismatchingColumns

cpp/src/arrow/csv/parser.cc:45–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45Status MismatchingColumns(const InvalidRow& row) {
46 std::string ellipse;
47 auto row_string = row.text;
48 if (row_string.length() > 100) {
49 row_string = row_string.substr(0, 96);
50 ellipse = " ...";
51 }
52 if (row.number < 0) {
53 return ParseError("Expected ", row.expected_columns, " columns, got ",
54 row.actual_columns, ": ", row_string, ellipse);
55 }
56 return ParseError("Row #", row.number, ": Expected ", row.expected_columns,
57 " columns, got ", row.actual_columns, ": ", row_string, ellipse);
58}
59
60inline bool IsControlChar(uint8_t c) { return c < ' '; }
61

Callers 1

HandleInvalidRowMethod · 0.85

Calls 3

substrMethod · 0.80
ParseErrorFunction · 0.70
lengthMethod · 0.45

Tested by

no test coverage detected