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

Function GetColumnNames

cpp/src/arrow/dataset/file_csv.cc:201–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199}
200
201Result<std::unordered_set<std::string>> GetColumnNames(
202 const csv::ReadOptions& read_options, const csv::ParseOptions& parse_options,
203 std::string_view first_block, MemoryPool* pool) {
204 ARROW_ASSIGN_OR_RAISE(
205 std::vector<std::string> ordered_names,
206 GetOrderedColumnNames(read_options, parse_options, first_block, pool));
207 std::unordered_set<std::string> unordered_names;
208 for (const auto& column : ordered_names) {
209 if (!unordered_names.emplace(column).second) {
210 return Status::Invalid("CSV file contained multiple columns named ", column);
211 }
212 }
213 return unordered_names;
214}
215
216static inline Result<csv::ConvertOptions> GetConvertOptions(
217 const CsvFileFormat& format, const ScanOptions* scan_options,

Callers

nothing calls this directly

Calls 3

GetOrderedColumnNamesFunction · 0.85
ARROW_ASSIGN_OR_RAISEFunction · 0.50
InvalidFunction · 0.50

Tested by

no test coverage detected