Skip to content

Commit

Permalink
[Go]: fix transactions (#98)
Browse files Browse the repository at this point in the history
Signed-off-by: sunby <sunbingyi1992@gmail.com>
  • Loading branch information
sunby committed Dec 26, 2023
1 parent ed6b9bd commit 76e506e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
7 changes: 3 additions & 4 deletions cpp/src/common/arrow_util.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -72,7 +72,6 @@ Result<std::shared_ptr<arrow::RecordBatchReader>> 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;
}

Expand Down
11 changes: 6 additions & 5 deletions go/storage/transaction/transaction.go
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -257,6 +256,7 @@ func (o *DeleteOperation) Execute() error {
if err != nil {
return err
}
fragment.AddFile(deleteFile)
}

if err = writer.Write(rec); err != nil {
Expand Down Expand Up @@ -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
}

0 comments on commit 76e506e

Please sign in to comment.