From 76e506e3ae48ff1ee7239d71c414390882a35e6b Mon Sep 17 00:00:00 2001 From: Bingyi Sun Date: Tue, 26 Dec 2023 11:34:37 +0800 Subject: [PATCH] [Go]: fix transactions (#98) Signed-off-by: sunby --- cpp/src/common/arrow_util.cpp | 7 +++---- go/storage/transaction/transaction.go | 11 ++++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cpp/src/common/arrow_util.cpp b/cpp/src/common/arrow_util.cpp index f07fa8a..3c504ea 100644 --- a/cpp/src/common/arrow_util.cpp +++ b/cpp/src/common/arrow_util.cpp @@ -1,11 +1,11 @@ // Copyright 2023 Zilliz -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -72,7 +72,6 @@ Result> MakeArrowRecordBatchReader( // RETURN_ARROW_NOT_OK(reader->GetRecordBatchReader(row_group_indices, column_indices, &record_reader)); RETURN_ARROW_NOT_OK(reader->GetRecordBatchReader(row_group_indices, &record_reader)); - LOG_STORAGE_INFO_ << "metadata for batch reader:" << record_reader->schema()->ToString(true); return record_reader; } diff --git a/go/storage/transaction/transaction.go b/go/storage/transaction/transaction.go index 5e9a3ce..31ecdd2 100644 --- a/go/storage/transaction/transaction.go +++ b/go/storage/transaction/transaction.go @@ -1,11 +1,11 @@ // Copyright 2023 Zilliz -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -174,7 +174,6 @@ func (w *WriteOperation) write( opt *options.WriteOptions, isScalar bool, ) (format.Writer, error) { - var columns []arrow.Array cols := rec.Columns() for k := range cols { @@ -257,6 +256,7 @@ func (o *DeleteOperation) Execute() error { if err != nil { return err } + fragment.AddFile(deleteFile) } if err = writer.Write(rec); err != nil { @@ -313,7 +313,8 @@ func (o *WriteBlobOperation) Execute() error { Name: o.name, Size: int64(len(o.content)), File: blobFile, - }} + }, + } o.transaction.commit.AddOp(op) return nil }