Browse Source

count rows function adapt euler eof

tags/v0.7.0-beta
jiangzhiwen 5 years ago
parent
commit
1125c71776
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      mindspore/ccsrc/minddata/dataset/engine/datasetops/source/csv_op.cc
  2. +1
    -1
      mindspore/ccsrc/minddata/dataset/engine/datasetops/source/csv_op.h

+ 2
- 2
mindspore/ccsrc/minddata/dataset/engine/datasetops/source/csv_op.cc View File

@@ -168,7 +168,7 @@ int CsvOp::CsvParser::end_file(char c) {
return 0;
}

int CsvOp::CsvParser::countRows(char c) {
int CsvOp::CsvParser::countRows(int c) {
Message m;
if (c == '"') {
m = Message::MS_QUOTE;
@@ -703,7 +703,7 @@ int64_t CsvOp::CountTotalRows(const std::string &file) {
}
csv_parser.Reset();
while (ifs.good()) {
char chr = ifs.get();
int chr = ifs.get();
if (csv_parser.countRows(chr) != 0) {
break;
}


+ 1
- 1
mindspore/ccsrc/minddata/dataset/engine/datasetops/source/csv_op.h View File

@@ -105,7 +105,7 @@ class CsvOp : public ParallelOp {
return it->second.second(*this, c);
}

int countRows(char c);
int countRows(int c);

Status initCsvParser();



Loading…
Cancel
Save