From f333ec82e6e8a3f7eb9ba1041d1442b2c7cd0f05 Mon Sep 17 00:00:00 2001 From: "J. Eric Ivancich" Date: Fri, 3 May 2024 00:58:30 -0400 Subject: [PATCH] s3select: remove compilation warnings (#156) One warning prevents rgw compilation against 15.0.0. This removes one additional warning in which a deprecated version of a function was called. Signed-off-by: J. Eric Ivancich --- include/s3select_parquet_intrf.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/s3select_parquet_intrf.h b/include/s3select_parquet_intrf.h index df04e161..7207796d 100644 --- a/include/s3select_parquet_intrf.h +++ b/include/s3select_parquet_intrf.h @@ -434,7 +434,7 @@ class RGWimpl : public ObjectInterface { #if ARROW_VERSION_MAJOR < 9 fd_ = -1; #else - fd_.Close(); + return fd_.Close(); #endif //RETURN_NOT_OK(::arrow::internal::FileClose(fd)); } @@ -1244,9 +1244,13 @@ void SerializedFile::ParseMetaDataOfEncryptedFileWithEncryptedFooter( std::to_string(metadata_buffer->size()) + " bytes)"); } +#if ARROW_VERSION_MAJOR > 9 + file_metadata_ = + FileMetaData::Make(metadata_buffer->data(), &metadata_len, default_reader_properties(), file_decryptor_); +#else file_metadata_ = FileMetaData::Make(metadata_buffer->data(), &metadata_len, file_decryptor_); - //FileMetaData::Make(metadata_buffer->data(), &metadata_len, default_reader_properties(), file_decryptor_); //version>9 +#endif } void SerializedFile::ParseMetaDataOfEncryptedFileWithPlaintextFooter(