Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
oceanbase
miniob
提交
ef43cea5
M
miniob
项目概览
oceanbase
/
miniob
1 年多 前同步成功
通知
74
Star
1521
Fork
537
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
分析
仓库
DevOps
项目成员
Pages
M
miniob
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Pages
分析
分析
仓库分析
DevOps
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
提交
提交
ef43cea5
编写于
7月 08, 2022
作者:
羽飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add file headers; remove unused files
上级
eca82312
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
28 addition
and
283 deletion
+28
-283
src/observer/event/#sql_event.cpp#
src/observer/event/#sql_event.cpp#
+0
-29
src/observer/event/execute_plan_event.cpp.bak
src/observer/event/execute_plan_event.cpp.bak
+0
-29
src/observer/event/execute_plan_event.h.bak
src/observer/event/execute_plan_event.h.bak
+0
-43
src/observer/event/query_cache_event.h.bak
src/observer/event/query_cache_event.h.bak
+0
-42
src/observer/event/resolve_event.cpp.bak
src/observer/event/resolve_event.cpp.bak
+0
-23
src/observer/event/resolve_event.h.bak
src/observer/event/resolve_event.h.bak
+0
-35
src/observer/sql/operator/index_scan_operator.cpp
src/observer/sql/operator/index_scan_operator.cpp
+14
-0
src/observer/sql/operator/index_scan_operator.h
src/observer/sql/operator/index_scan_operator.h
+14
-0
src/observer/sql/operator/join_operator.cpp.bak
src/observer/sql/operator/join_operator.cpp.bak
+0
-82
未找到文件。
src/observer/event/#sql_event.cpp#
已删除
100644 → 0
浏览文件 @
eca82312
/* Copyright (c) 2021 Xie Meiyi(xiemeiyi@hust.edu.cn) and OceanBase and/or its affiliates. All rights reserved.
miniob is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details. */
//
// Created by Longda on 2021/4/14.
//
#include "event/sql_event.h"
#include "event/session_event.h"
SQLStageEvent::SQLStageEvent(SessionEvent *event, const std::string &sql) : session_event_(event), sql_(sql)
{}
SQLStageEvent::~SQLStageEvent() noexcept
{
if (session_event_ != nullptr) {
session_event_ = nullptr;
// SessionEvent *session_event = session_event_;
// session_event_ = nullptr;
// session_event->doneImmediate();
}
}
src/observer/event/execute_plan_event.cpp.bak
已删除
100644 → 0
浏览文件 @
eca82312
/* Copyright (c) 2021 Xie Meiyi(xiemeiyi@hust.edu.cn) and OceanBase and/or its affiliates. All rights reserved.
miniob is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details. */
//
// Created by Wangyunlai on 2021/5/11.
//
#include "event/execution_plan_event.h"
#include "event/sql_event.h"
ExecutionPlanEvent::ExecutionPlanEvent(SQLStageEvent *sql_event, Query *sqls) : sql_event_(sql_event), sqls_(sqls)
{}
ExecutionPlanEvent::~ExecutionPlanEvent()
{
sql_event_ = nullptr;
// if (sql_event_) {
// sql_event_->doneImmediate();
// }
query_destroy(sqls_);
sqls_ = nullptr;
}
src/observer/event/execute_plan_event.h.bak
已删除
100644 → 0
浏览文件 @
eca82312
/* Copyright (c) 2021 Xie Meiyi(xiemeiyi@hust.edu.cn) and OceanBase and/or its affiliates. All rights reserved.
miniob is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details. */
//
// Created by Wangyunlai on 2021/5/11.
//
#pragma once
#include "common/seda/stage_event.h"
class SQLStageEvent;
class ExecutePlanEvent : public common::StageEvent {
public:
ExecutePlanEvent(SQLStageEvent *sql_event, common::StageEvent *parent_event)
: sql_event_(sql_event), parent_event_(parent_event)
{}
virtual ~ExecutePlanEvent() = default;
SQLStageEvent *sql_event() const
{
return sql_event_;
}
common::StageEvent *parent_event() const {
return parent_event_;
}
private:
SQLStageEvent *sql_event_ = nullptr;
common::StageEvent *parent_event_ = nullptr;
};
#endif // __OBSERVER_EVENT_EXECUTION_PLAN_EVENT_H__
src/observer/event/query_cache_event.h.bak
已删除
100644 → 0
浏览文件 @
eca82312
/* Copyright (c) 2021 Xie Meiyi(xiemeiyi@hust.edu.cn) and OceanBase and/or its affiliates. All rights reserved.
miniob is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details. */
//
// Created by Wangyunlai on 2022/5/23.
//
#pragma once
#include "common/seda/stage_event.h"
class SQLStageEvent;
class Stmt;
class QueryCacheEvent : public common::StageEvent {
public:
QueryCacheEvent(SQLStageEvent *sql_event, common::StageEvent *parent_event)
: sql_event_(sql_event), parent_event_(parent_event)
{}
virtual ~QueryCacheEvent() noexcept = default;
SQLStageEvent *sql_event() const {
return sql_event_;
}
common::StageEvent *parent_event() const {
return parent_event_;
}
private:
SQLStageEvent *sql_event_ = nullptr;
common::StageEvent *parent_event_ = nullptr;
};
src/observer/event/resolve_event.cpp.bak
已删除
100644 → 0
浏览文件 @
eca82312
/* Copyright (c) 2021 Xie Meiyi(xiemeiyi@hust.edu.cn) and OceanBase and/or its affiliates. All rights reserved.
miniob is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details. */
//
// Created by Wangyunlai on 2022/5/23.
//
#include "event/resolve_event.h"
#include "event/session_event.h"
ResolveStageEvent(SessionEvent *event) : session_event_(event)
{}
ResolveStageEvent::~ResolveStageEvent() noexcept
{
}
src/observer/event/resolve_event.h.bak
已删除
100644 → 0
浏览文件 @
eca82312
/* Copyright (c) 2021 Xie Meiyi(xiemeiyi@hust.edu.cn) and OceanBase and/or its affiliates. All rights reserved.
miniob is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details. */
//
// Created by Wangyunlai on 2022/5/23.
//
#pragma once
#include "common/seda/stage_event.h"
class SessionEvent;
class Stmt;
class ResolveStageEvent : public BaseEvent {
public:
ResolveStageEvent(SessionEvent *event);
virtual ~ResolveStageEvent() noexcept;
SessionEvent *session_event() const
{
return session_event_;
}
private:
SessionEvent *session_event_ = nullptr;
};
src/observer/sql/operator/index_scan_operator.cpp
浏览文件 @
ef43cea5
/* Copyright (c) 2021 Xie Meiyi(xiemeiyi@hust.edu.cn) and OceanBase and/or its affiliates. All rights reserved.
miniob is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details. */
//
// Created by Wangyunlai on 2022/07/08.
//
#include "sql/operator/index_scan_operator.h"
#include "storage/index/index.h"
...
...
src/observer/sql/operator/index_scan_operator.h
浏览文件 @
ef43cea5
/* Copyright (c) 2021 Xie Meiyi(xiemeiyi@hust.edu.cn) and OceanBase and/or its affiliates. All rights reserved.
miniob is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details. */
//
// Created by Wangyunlai on 2022/07/08.
//
#pragma once
#include "sql/operator/operator.h"
...
...
src/observer/sql/operator/join_operator.cpp.bak
已删除
100644 → 0
浏览文件 @
eca82312
/* Copyright (c) 2021 Xie Meiyi(xiemeiyi@hust.edu.cn) and OceanBase and/or its affiliates. All rights reserved.
miniob is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details. */
//
// Created by WangYunlai on 2021/6/10.
//
#include "sql/operator/join_operator.h"
RC JoinOperator::open()
{
RC rc = left_->open();
if (rc != RC::SUCCESS) {
LOG_WARN("failed to open left operator. rc=%d:%s", rc, strrc(rc));
return rc;
}
rc = right_->open();
if (rc != RC::SUCCESS) {
LOG_WARN("failed to open right operator. rc=%d:%s", rc, strrc(rc));
return rc;
}
return rc;
}
RC JoinOperator::step_right()
{
rc = right_->next();
while (rc == RC::SUCCESS) {
if (predicate_->filter()) {
return rc;
}
rc = right_->next();
}
return rc;
}
RC JoinOperator::next()
{
RC rc = RC::SUCCESS;
while (true) {
if (round_done_) {
rc = left_->next();
if (rc != RC::SUCCESS) {
return rc;
}
round_done_ = false;
right_->close();
right_->open(); // TODO
}
rc = step_right();
if (rc == RC::SUCCESS) {
return rc;
}
if (rc == RC::RECORD_EOF) {
round_done_ = true;
} else {
return rc;
}
}
return RC::RECORD_EOF;
}
RC JoinOperator::close()
{
left_->close();
right_->close();
return RC::SUCCESS;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录