Skip to content

Commit

Permalink
Added exception and adjusted style
Browse files Browse the repository at this point in the history
  • Loading branch information
rfdavid committed Aug 3, 2023
1 parent 9e007be commit 218a608
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/include/processor/operator/copy_to/csv_file_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ class CSVFileWriter {
void writeValues(std::vector<common::ValueVector*>& outputVectors);

private:
uint64_t fileOffset = 0;
std::stringstream buffer;
std::unique_ptr<common::FileInfo> fileInfo;

void escapeString(std::string& value);
void writeValue(common::ValueVector* vector);
void flush();
Expand All @@ -31,6 +27,10 @@ class CSVFileWriter {

inline void writeToBuffer(const std::string& value) { buffer << value; }
inline void writeToBuffer(const char value) { buffer << value; }

uint64_t fileOffset = 0;
std::stringstream buffer;
std::unique_ptr<common::FileInfo> fileInfo;
};

} // namespace processor
Expand Down
2 changes: 1 addition & 1 deletion src/processor/operator/copy_to/csv_file_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void CSVFileWriter::writeValue(common::ValueVector* vector) {
case LogicalTypeID::STRUCT:
return writeListToBuffer<struct_entry_t>(vector, selPos);

Check warning on line 98 in src/processor/operator/copy_to/csv_file_writer.cpp

View check run for this annotation

Codecov / codecov/patch

src/processor/operator/copy_to/csv_file_writer.cpp#L97-L98

Added lines #L97 - L98 were not covered by tests
default: {
// suppress warning
NotImplementedException("CSVFileWriter::writeValue");

Check warning on line 100 in src/processor/operator/copy_to/csv_file_writer.cpp

View check run for this annotation

Codecov / codecov/patch

src/processor/operator/copy_to/csv_file_writer.cpp#L100

Added line #L100 was not covered by tests
}
}
}
Expand Down

0 comments on commit 218a608

Please sign in to comment.