!4029 CSV dataset's rows counting adapts the eof of Euler OS

Merge pull request !4029 from jiangzhiwen/dataset/adapt_eof_fix
This commit is contained in:
mindspore-ci-bot 2020-08-06 14:53:15 +08:00 committed by Gitee
commit 57fd31b221
2 changed files with 3 additions and 3 deletions

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;
@ -701,7 +701,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;
}

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();