Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
acquamarin committed Jun 18, 2023
1 parent 8b3b793 commit f4a0e82
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/function/vector_blob_operations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "function/blob/operations/decode_operation.h"
#include "function/blob/operations/encode_operation.h"
#include "function/string/operations/length_operation.h"
#include "function/blob/operations/octet_length_operation.h"
#include "function/string/vector_string_operations.h"

namespace kuzu {
Expand All @@ -13,7 +13,7 @@ vector_operation_definitions OctetLengthVectorOperations::getDefinitions() {
definitions.push_back(make_unique<VectorOperationDefinition>(common::OCTET_LENGTH_FUNC_NAME,
std::vector<common::LogicalTypeID>{common::LogicalTypeID::BLOB},
common::LogicalTypeID::INT64,
UnaryExecFunction<common::ku_string_t, int64_t, operation::Length>, nullptr, nullptr,
UnaryExecFunction<common::blob_t, int64_t, operation::OctetLength>, nullptr, nullptr,
nullptr, false /* isVarLength */));
return definitions;
}

Check warning on line 19 in src/function/vector_blob_operations.cpp

View check run for this annotation

Codecov / codecov/patch

src/function/vector_blob_operations.cpp#L19

Added line #L19 was not covered by tests
Expand Down
3 changes: 0 additions & 3 deletions src/include/function/blob/operations/decode_operation.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#pragma once

#include <cassert>
#include <cstring>

#include "common/types/blob.h"
#include "utf8proc_wrapper.h"

Expand Down
3 changes: 0 additions & 3 deletions src/include/function/blob/operations/encode_operation.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#pragma once

#include <cassert>
#include <cstring>

#include "common/types/blob.h"

namespace kuzu {
Expand Down
17 changes: 17 additions & 0 deletions src/include/function/blob/operations/octet_length_operation.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#pragma once

#include "common/types/blob.h"

namespace kuzu {
namespace function {
namespace operation {

struct OctetLength {
static inline void operation(common::blob_t& input, int64_t& result) {
result = input.value.len;
}
};

} // namespace operation
} // namespace function
} // namespace kuzu

0 comments on commit f4a0e82

Please sign in to comment.