Skip to content

Commit 697fc74

Browse files
committed
Fix
Signed-off-by: noob <yixiao121314@outlook.com>
1 parent 19722ff commit 697fc74

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/parser/statement/extra/create_index_info.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ namespace infinity {
2828
enum class SecondaryIndexCardinality : uint8_t { kHighCardinality = 0, kLowCardinality = 1, kInvalid = 255 };
2929

3030
enum class IndexType {
31-
kInvalid,
3231
kIVF,
3332
kHnsw,
3433
kBMP,
3534
kFullText,
3635
kSecondary,
3736
kSecondaryFunctional,
3837
kEMVB,
38+
kInvalid,
3939
kDiskAnn,
4040
};
4141

src/storage/buffer/file_worker/file_worker.cppm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export struct FileWorker {
8787
explicit FileWorker(std::shared_ptr<std::string> file_path);
8888

8989
// No destruct here
90-
virtual ~FileWorker() = default;
90+
~FileWorker() = default;
9191

9292
[[nodiscard]] std::string GetPath() const;
9393

src/storage/buffer/file_worker/raw_file_worker.cppm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace infinity {
2828
export struct RawFileWorker : IndexFileWorker {
2929
explicit RawFileWorker(std::shared_ptr<std::string> file_path, u32 file_size);
3030

31-
virtual ~RawFileWorker();
31+
~RawFileWorker();
3232

3333
[[nodiscard]] FileWorkerType Type() const { return FileWorkerType::kRawFile; }
3434

src/storage/definition/index_base_impl.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ std::shared_ptr<IndexBase> IndexBase::ReadAdv(const char *&ptr, int32_t maxbytes
106106
}
107107
IndexType index_type = ReadBufAdv<IndexType>(ptr);
108108
std::vector<std::string> column_names;
109-
std::shared_ptr<std::string> index_name = std::make_shared<std::string>(ReadBufAdv<std::string>(ptr));
110-
std::shared_ptr<std::string> index_comment = std::make_shared<std::string>(ReadBufAdv<std::string>(ptr));
109+
auto index_name = std::make_shared<std::string>(ReadBufAdv<std::string>(ptr));
110+
auto index_comment = std::make_shared<std::string>(ReadBufAdv<std::string>(ptr));
111111
std::string file_name = ReadBufAdv<std::string>(ptr);
112112
int32_t column_names_size = ReadBufAdv<int32_t>(ptr);
113113
for (int32_t i = 0; i < column_names_size; ++i) {
@@ -162,15 +162,15 @@ std::shared_ptr<IndexBase> IndexBase::ReadAdv(const char *&ptr, int32_t maxbytes
162162
break;
163163
}
164164
case IndexType::kSecondary: {
165-
SecondaryIndexCardinality cardinality = SecondaryIndexCardinality(ReadBufAdv<u8>(ptr));
165+
auto cardinality = static_cast<SecondaryIndexCardinality>(ReadBufAdv<u8>(ptr));
166166
res = std::make_shared<IndexSecondary>(index_name, index_comment, file_name, column_names, cardinality);
167167
break;
168168
}
169169
case IndexType::kSecondaryFunctional: {
170-
std::shared_ptr<std::string> func_col_params = std::make_shared<std::string>(ReadBufAdv<std::string>(ptr));
170+
auto func_col_params = std::make_shared<std::string>(ReadBufAdv<std::string>(ptr));
171171
auto func_return_type = DataType::ReadAdv(ptr, maxbytes);
172-
std::shared_ptr<std::string> function_expression_str = std::make_shared<std::string>(ReadBufAdv<std::string>(ptr));
173-
SecondaryIndexCardinality cardinality = SecondaryIndexCardinality(ReadBufAdv<u8>(ptr));
172+
auto function_expression_str = std::make_shared<std::string>(ReadBufAdv<std::string>(ptr));
173+
auto cardinality = static_cast<SecondaryIndexCardinality>(ReadBufAdv<u8>(ptr));
174174
res = std::make_shared<IndexSecondaryFunctional>(index_name,
175175
index_comment,
176176
file_name,

0 commit comments

Comments
 (0)