Commit 46bc0522 authored by test's avatar test
Browse files

MS-575 Add Clang-format & Clang-tidy & Cpplint


Former-commit-id: 1c5cb6cc42c0b79b830f0d0c6af43775538049b2
parent 339e0b26
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -296,7 +296,8 @@ DBImpl::CreateIndex(const std::string& table_id, const TableIndex& index) {
    std::vector<int> file_types;
    if (index.engine_type_ == static_cast<int32_t>(EngineType::FAISS_IDMAP)) {
        file_types = {
            static_cast<int32_t>(meta::TableFileSchema::NEW), static_cast<int32_t>(meta::TableFileSchema::NEW_MERGE),
            static_cast<int32_t>(meta::TableFileSchema::NEW),
            static_cast<int32_t>(meta::TableFileSchema::NEW_MERGE),
        };
    } else {
        file_types = {
+12 −9
Original line number Diff line number Diff line
@@ -148,14 +148,17 @@ static const MetaSchema TABLES_SCHEMA(META_TABLES, {
                                                   });

// TableFiles schema
static const MetaSchema TABLEFILES_SCHEMA(
    META_TABLEFILES,
    {
        MetaField("id", "BIGINT", "PRIMARY KEY AUTO_INCREMENT"), MetaField("table_id", "VARCHAR(255)", "NOT NULL"),
        MetaField("engine_type", "INT", "DEFAULT 1 NOT NULL"), MetaField("file_id", "VARCHAR(255)", "NOT NULL"),
        MetaField("file_type", "INT", "DEFAULT 0 NOT NULL"), MetaField("file_size", "BIGINT", "DEFAULT 0 NOT NULL"),
        MetaField("row_count", "BIGINT", "DEFAULT 0 NOT NULL"), MetaField("updated_time", "BIGINT", "NOT NULL"),
        MetaField("created_on", "BIGINT", "NOT NULL"), MetaField("date", "INT", "DEFAULT -1 NOT NULL"),
static const MetaSchema TABLEFILES_SCHEMA(META_TABLEFILES, {
                                                               MetaField("id", "BIGINT", "PRIMARY KEY AUTO_INCREMENT"),
                                                               MetaField("table_id", "VARCHAR(255)", "NOT NULL"),
                                                               MetaField("engine_type", "INT", "DEFAULT 1 NOT NULL"),
                                                               MetaField("file_id", "VARCHAR(255)", "NOT NULL"),
                                                               MetaField("file_type", "INT", "DEFAULT 0 NOT NULL"),
                                                               MetaField("file_size", "BIGINT", "DEFAULT 0 NOT NULL"),
                                                               MetaField("row_count", "BIGINT", "DEFAULT 0 NOT NULL"),
                                                               MetaField("updated_time", "BIGINT", "NOT NULL"),
                                                               MetaField("created_on", "BIGINT", "NOT NULL"),
                                                               MetaField("date", "INT", "DEFAULT -1 NOT NULL"),
                                                           });

}  // namespace
+4 −4
Original line number Diff line number Diff line
@@ -24,7 +24,8 @@ namespace scheduler {
bool
HybridPass::Run(const TaskPtr& task) {
    // TODO: Index::IVFSQ8Hybrid, if nq < threshold set cpu, else set gpu
    if (task->Type() != TaskType::SearchTask) return false;
    if (task->Type() != TaskType::SearchTask)
        return false;
    auto search_task = std::static_pointer_cast<XSearchTask>(task);
    // if (search_task->file_->engine_type_ == engine::EngineType::FAISS_IVFSQ8Hybrid)
    return false;
@@ -32,4 +33,3 @@ HybridPass::Run(const TaskPtr& task) {

}  // namespace scheduler
}  // namespace milvus
+9 −10
Original line number Diff line number Diff line
@@ -16,16 +16,16 @@
// under the License.
#pragma once

#include <string>
#include <vector>
#include <condition_variable>
#include <deque>
#include <list>
#include <memory>
#include <mutex>
#include <queue>
#include <deque>
#include <unordered_map>
#include <string>
#include <thread>
#include <mutex>
#include <condition_variable>
#include <memory>
#include <unordered_map>
#include <vector>

#include "Pass.h"

@@ -45,4 +45,3 @@ using HybridPassPtr = std::shared_ptr<HybridPass>;

}  // namespace scheduler
}  // namespace milvus
+2 −3
Original line number Diff line number Diff line
@@ -40,4 +40,3 @@ Optimizer::Run(const TaskPtr& task) {

}  // namespace scheduler
}  // namespace milvus
Loading