Skip to content

Commit

Permalink
set nullptr when file type is not csv
Browse files Browse the repository at this point in the history
  • Loading branch information
Wei Pang authored and Wei Pang committed Jan 13, 2023
1 parent f88a857 commit 0225694
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/include/common/csv_reader/csv_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ struct ReaderConfig {

struct CopyDescription {
CopyDescription(const string& filePath, const ReaderConfig readerConfig)
: filePath{filePath}, readerConfig{make_shared<ReaderConfig>(readerConfig)},
: filePath{filePath}, readerConfig{nullptr},
fileType{FileType::CSV} {
setFileType(filePath);
if (fileType == FileType::CSV) {
this->readerConfig = make_shared<ReaderConfig>(readerConfig);
}
}

enum class FileType { CSV, ARROW, PARQUET };
Expand Down

0 comments on commit 0225694

Please sign in to comment.