diff --git a/plugins/parquet/parquetembed.cpp b/plugins/parquet/parquetembed.cpp index e07ef588779..4ebe9760bbc 100644 --- a/plugins/parquet/parquetembed.cpp +++ b/plugins/parquet/parquetembed.cpp @@ -163,7 +163,7 @@ arrow::Status ParquetReader::openReadFile() failx("Incorrect partitioning type %s.", partOption.c_str()); } // Create the dataset factory - PARQUET_ASSIGN_OR_THROW(auto datasetFactory, arrow::dataset::FileSystemDatasetFactory::Make(fs, selector, format, options)); + PARQUET_ASSIGN_OR_THROW(auto datasetFactory, arrow::dataset::FileSystemDatasetFactory::Make(std::move(fs), std::move(selector), format, std::move(options))); // Get scanner PARQUET_ASSIGN_OR_THROW(auto dataset, datasetFactory->Finish()); @@ -372,7 +372,7 @@ arrow::Result> ParquetReader::queryRows() // Convert the current batch to a table PARQUET_ASSIGN_OR_THROW(auto batch, *rbatchItr); rbatchItr++; - std::vector> toTable = {batch}; + std::vector> toTable = {std::move(batch)}; return std::move(arrow::Table::FromRecordBatches(std::move(toTable))); } @@ -457,7 +457,7 @@ arrow::Status ParquetWriter::openWriteFile() ARROW_ASSIGN_OR_RAISE(auto filesystem, arrow::fs::FileSystemFromUriOrPath(destination)); auto format = std::make_shared(); writeOptions.file_write_options = format->DefaultWriteOptions(); - writeOptions.filesystem = filesystem; + writeOptions.filesystem = std::move(filesystem); writeOptions.base_dir = destination; writeOptions.partitioning = partitionType; writeOptions.existing_data_behavior = arrow::dataset::ExistingDataBehavior::kOverwriteOrIgnore; @@ -484,7 +484,7 @@ arrow::Status ParquetWriter::openWriteFile() std::shared_ptr arrowProps = parquet::ArrowWriterProperties::Builder().store_schema()->build(); // Create a writer - ARROW_ASSIGN_OR_RAISE(writer, parquet::arrow::FileWriter::Open(*schema.get(), pool, outfile, props, arrowProps)); + ARROW_ASSIGN_OR_RAISE(writer, parquet::arrow::FileWriter::Open(*schema.get(), pool, outfile, std::move(props), std::move(arrowProps))); } return arrow::Status::OK(); } diff --git a/plugins/parquet/parquetembed.hpp b/plugins/parquet/parquetembed.hpp index f537eba588b..b9db5085c82 100644 --- a/plugins/parquet/parquetembed.hpp +++ b/plugins/parquet/parquetembed.hpp @@ -878,7 +878,7 @@ class ParquetRowStream : public RtlCInterface, implements IRowStream { public: ParquetRowStream(IEngineRowAllocator *_resultAllocator, std::shared_ptr _parquetReader) - : resultAllocator(_resultAllocator), parquetReader(_parquetReader) {} + : resultAllocator(_resultAllocator), parquetReader(std::move(_parquetReader)) {} virtual ~ParquetRowStream() = default; RTLIMPLEMENT_IINTERFACE @@ -947,7 +947,7 @@ class ParquetRecordBinder : public CInterfaceOf { public: ParquetRecordBinder(const IContextLogger &_logctx, const RtlTypeInfo *_typeInfo, int _firstParam, std::shared_ptr _parquetWriter) - : logctx(_logctx), typeInfo(_typeInfo), firstParam(_firstParam), dummyField("", NULL, typeInfo), thisParam(_firstParam), parquetWriter(_parquetWriter) {} + : logctx(_logctx), typeInfo(_typeInfo), firstParam(_firstParam), dummyField("", NULL, typeInfo), thisParam(_firstParam), parquetWriter(std::move(_parquetWriter)) {} virtual ~ParquetRecordBinder() = default; int numFields(); void processRow(const byte *row);