morningman commented on code in PR #25280: URL: https://github.com/apache/doris/pull/25280#discussion_r1355120710
########## be/src/vec/exec/format/csv/csv_reader.cpp: ########## @@ -527,6 +527,9 @@ Status CsvReader::get_parsed_schema(std::vector<std::string>* col_names, bool is_parse_name = false; RETURN_IF_ERROR(_prepare_parse(&read_line, &is_parse_name)); + if (_file_reader->size() == 0) { Review Comment: Need to add comment to explain why return OK when file size is 0 ########## be/src/vec/exec/format/csv/csv_reader.cpp: ########## @@ -924,7 +923,7 @@ Status CsvReader::_parse_col_names(std::vector<std::string>* col_names) { // no use of _line_reader_eof RETURN_IF_ERROR(_line_reader->read_line(&ptr, &size, &_line_reader_eof, _io_ctx)); if (size == 0) { - return Status::InternalError("The first line is empty, can not parse column names"); + return Status::OK(); Review Comment: ditto ########## fe/fe-core/src/main/java/org/apache/doris/tablefunction/ExternalFileTableValuedFunction.java: ########## @@ -344,6 +344,10 @@ public List<Column> getTableColumns() throws AnalysisException { TNetworkAddress address = new TNetworkAddress(be.getHost(), be.getBrpcPort()); try { PFetchTableSchemaRequest request = getFetchTableStructureRequest(); + if (request == null) { Review Comment: unify it to `fillColumns` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org