diff --git a/src/observer/common/type/vector_type.h b/src/observer/common/type/vector_type.h index 40ff298bc..9e9f81509 100644 --- a/src/observer/common/type/vector_type.h +++ b/src/observer/common/type/vector_type.h @@ -22,11 +22,11 @@ class VectorType : public DataType VectorType() : DataType(AttrType::VECTORS) {} virtual ~VectorType() {} - int compare(const Value &left, const Value &right) const override {return INT32_MAX; } + int compare(const Value &left, const Value &right) const override { return INT32_MAX; } - RC add(const Value &left, const Value &right, Value &result) const override {return RC::UNIMPLEMENTED; } - RC subtract(const Value &left, const Value &right, Value &result) const override {return RC::UNIMPLEMENTED; } - RC multiply(const Value &left, const Value &right, Value &result) const override {return RC::UNIMPLEMENTED; } + RC add(const Value &left, const Value &right, Value &result) const override { return RC::UNIMPLEMENTED; } + RC subtract(const Value &left, const Value &right, Value &result) const override { return RC::UNIMPLEMENTED; } + RC multiply(const Value &left, const Value &right, Value &result) const override { return RC::UNIMPLEMENTED; } - RC to_string(const Value &val, string &result) const override {return RC::UNIMPLEMENTED; } + RC to_string(const Value &val, string &result) const override { return RC::UNIMPLEMENTED; } }; \ No newline at end of file diff --git a/src/observer/storage/index/index.h b/src/observer/storage/index/index.h index 303c5bb84..790c34cd4 100644 --- a/src/observer/storage/index/index.h +++ b/src/observer/storage/index/index.h @@ -40,10 +40,16 @@ class Index Index() = default; virtual ~Index() = default; - virtual RC create(Table *table, const char *file_name, const IndexMeta &index_meta, const FieldMeta &field_meta) {return RC::UNSUPPORTED; } - virtual RC open(Table *table, const char *file_name, const IndexMeta &index_meta, const FieldMeta &field_meta) {return RC::UNSUPPORTED; } - - virtual bool is_vector_index() {return false; } + virtual RC create(Table *table, const char *file_name, const IndexMeta &index_meta, const FieldMeta &field_meta) + { + return RC::UNSUPPORTED; + } + virtual RC open(Table *table, const char *file_name, const IndexMeta &index_meta, const FieldMeta &field_meta) + { + return RC::UNSUPPORTED; + } + + virtual bool is_vector_index() { return false; } const IndexMeta &index_meta() const { return index_meta_; } diff --git a/src/observer/storage/index/ivfflat_index.h b/src/observer/storage/index/ivfflat_index.h index 753d78646..cb09f47ad 100644 --- a/src/observer/storage/index/ivfflat_index.h +++ b/src/observer/storage/index/ivfflat_index.h @@ -19,7 +19,7 @@ See the Mulan PSL v2 for more details. */ class IvfflatIndex : public Index { public: - IvfflatIndex() {}; + IvfflatIndex(){}; virtual ~IvfflatIndex() noexcept {}; RC create(Table *table, const char *file_name, const IndexMeta &index_meta, const FieldMeta &field_meta) @@ -28,11 +28,11 @@ class IvfflatIndex : public Index }; RC open(Table *table, const char *file_name, const IndexMeta &index_meta, const FieldMeta &field_meta) { - + return RC::UNIMPLEMENTED; }; - vector ann_search(const vector &base_vector, size_t limit) {return vector(); } + vector ann_search(const vector &base_vector, size_t limit) { return vector(); } RC close() { return RC::UNIMPLEMENTED; } @@ -42,8 +42,8 @@ class IvfflatIndex : public Index RC sync() override { return RC::UNIMPLEMENTED; }; private: - bool inited_ = false; - Table * table_ = nullptr; - int lists_ = 1; - int probes_ = 1; + bool inited_ = false; + Table *table_ = nullptr; + int lists_ = 1; + int probes_ = 1; };