diff --git a/src/share/schema/ob_schema_printer.cpp b/src/share/schema/ob_schema_printer.cpp index a81777aa7..2151f764a 100644 --- a/src/share/schema/ob_schema_printer.cpp +++ b/src/share/schema/ob_schema_printer.cpp @@ -5678,6 +5678,7 @@ int ObSchemaPrinter::print_external_table_file_info(const ObTableSchema &table_s if (OB_SUCC(ret) && ObExternalFileFormat::CSV_FORMAT == format.format_type_) { const ObCSVGeneralFormat &csv = format.csv_format_; const ObOriginFileFormat &origin_format = format.origin_file_format_str_; + const char *compression_name = compression_format_to_string(format.compression_format_); if (OB_FAIL(0 != csv.line_term_str_.case_compare(ObDataInFileStruct::DEFAULT_LINE_TERM_STR) && databuff_printf(buf, buf_len, pos, "\n LINE_DELIMITER = %.*s,", origin_format.origin_line_term_str_.length(), origin_format.origin_line_term_str_.ptr()))) { SHARE_SCHEMA_LOG(WARN, "fail to print LINE_DELIMITER", K(ret)); @@ -5707,6 +5708,10 @@ int ObSchemaPrinter::print_external_table_file_info(const ObTableSchema &table_s } else if (OB_FAIL(0 != csv.null_if_.count() && databuff_printf(buf, buf_len, pos, "\n NULL_IF = (%.*s),", origin_format.origin_null_if_str_.length(), origin_format.origin_null_if_str_.ptr()))) { SHARE_SCHEMA_LOG(WARN, "fail to print NULL_IF", K(ret)); + } else if (ObLoadCompressionFormat::NONE != format.compression_format_ && + OB_FAIL(databuff_printf(buf, buf_len, pos, "\n COMPRESSION = %.*s,", + static_cast(STRLEN(compression_name)), compression_name))) { + SHARE_SCHEMA_LOG(WARN, "fail to print compression", K(ret)); } } else if (OB_SUCC(ret) && ObExternalFileFormat::ODPS_FORMAT == format.format_type_) { const ObODPSGeneralFormat &odps = format.odps_format_; diff --git a/src/sql/engine/table/ob_external_table_access_service.cpp b/src/sql/engine/table/ob_external_table_access_service.cpp index 1d06bdfb0..29b2c6f77 100644 --- a/src/sql/engine/table/ob_external_table_access_service.cpp +++ b/src/sql/engine/table/ob_external_table_access_service.cpp @@ -379,6 +379,8 @@ int ObExternalStreamFileReader::open(const ObString &filename) } else if (OB_FAIL(data_access_driver_.get_file_size(filename.ptr(), file_size_))) { LOG_WARN("failed to get file size", K(ret), K(filename)); } else { + is_file_end_ = false; + ObLoadCompressionFormat this_file_compression_format = compression_format_; if (this_file_compression_format == ObLoadCompressionFormat::AUTO && OB_FAIL(compression_format_from_suffix(filename, this_file_compression_format))) {