Skip to content

Commit 875c378

Browse files
committed
fix(cpp): declare CsvChunkReader methods in header and fix scan_schema member accesses
1 parent 6ed0a0e commit 875c378

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

cpp/include/arnio/csv_reader.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ class CsvChunkReader {
8787
explicit CsvChunkReader(const CsvConfig& config = CsvConfig{});
8888
~CsvChunkReader();
8989

90+
void open(const std::string& path);
91+
std::optional<CsvParseResult> next_chunk(size_t chunksize,
92+
const std::string& on_bad_lines = "error");
93+
void close();
94+
9095
// Infer DType from a string value
9196
DType infer_type(const std::string& value) const;
9297

cpp/src/csv_reader.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,9 +1180,9 @@ CsvReader::scan_schema(const std::string& path, const std::string& on_bad_lines)
11801180

11811181
if (record_reader.read(line)) {
11821182
strip_utf8_bom(line);
1183-
header = parse_line(line);
1183+
header = parser_.parse_line(line);
11841184
for (auto& h : header) {
1185-
if (config_.trim_headers) trim_in_place(h);
1185+
if (config.trim_headers) trim_in_place(h);
11861186
}
11871187
}
11881188

0 commit comments

Comments
 (0)