cmu15-445 Project #3 - Query Execution

2024-03-11 06:32

本文主要是介绍cmu15-445 Project #3 - Query Execution,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

这个project的目标是在原来的基础上增加语句执行,实现执行器中的获取查询计划节点并且执行,以及实现执行器中的sequential scans,inserts,hash join, aggregations等功能。执行器使用volcano model,每一个查询计划执行器都实现Next函数,Next会返回一个元组或者返回空。

TASK #1 - CREATING A CATALOG TABLE

数据库需要维护一个内部的catalog去记录数据库的元信息,例如用用于记录数据库中有什么table以及这些table的在哪里。请添加图片描述
在task1中只需实现src/include/catalog/simple_catalog.h中的CreateTable,GetTable(const std::string &table_name), 和GetTable(table_oid_t table_oid)这三个函数,只需要查看SimpleCatalog和TableMetaData这两个类的构造函数然后传入正确的参数即可。在SimpleCatalog中通过names_来记录table name和table_oid的映射,通过tables_来记录table_oid和TableMetadata的映射,在GetTable中如果找不到对应的table则抛出std::out_of_range异常。

TASK #2 - EXECUTORS

在Task 2中将会实现sequential scans、inserts、hash joins和aggregations的executors,对于每一种算子都要实现Init函数和Next函数,其中Init函数用于初始化算法(如获取对应的表),Next每次调用都会返回一个tuple。
算子对应的实现位于以下文件:

src/include/execution/executors/seq_scan_executor.h
src/include/execution/executors/insert_executor.h
src/include/execution/executors/hash_join_executor.h
src/include/execution/executors/aggregation_executor.h

如果想要了解executors是如何在运行时被创建的,参考文件
src/include/execution/executor_factory.h中的ExecutorFactory类。每个executor都有成员ExecutorContext(src/include/execution/executor_context.h),其中维护了query的相关信息。

ExecutorFactory中的成员函数为CreateExecutor,其中CreateExecutor的声明如下:

std::uniqu

这篇关于cmu15-445 Project #3 - Query Execution的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/796951

相关文章

Debugging Lua Project created in Cocos Code IDE creates “Waiting for debugger to connect” in Win-7

转自 I Installed Cocos Code IDE and created a new Lua Project. When Debugging the Project(F11) the game window pops up and gives me the message waiting for debugger to connect and then freezes. Also a

SVN Cornerstone 报错信息 xcodeproj cannot be opened because the project file cannot be parsed.

svn点击update 之后,打开xcode工程文件,会出现  xxx..xcodeproj  cannot be opened because the project file cannot be parsed. 发现项目中代码全没了。只有一个空的工程名字,因为xcodeproj工程文件冲突了,然后就是svn强制给你更新了,内部的文件冲突了,你们改了同样的地方的一段代码,可能是你们只是多加

构建现代API:FastAPI中Query与Body参数的最佳搭配

在FastAPI中,Query 和 Body 是两种不同的依赖注入器,它们的应用场景取决于你的具体需求。以下是它们各自常见的使用场景: Query 参数 使用场景: 当你需要从URL中获取一些简单的参数时,例如过滤、排序、分页等。 当数据量不大,且可以作为URL的一部分安全传输时。当数据不需要复杂的结构时。 Body 参数 使用场景: 当你需要发送较为复杂的数据结构时,例如包含多个字段

兔子--Android Studio出现错误:Error:Execution failed for task ':myapp:dexDebug'. com.android.ide.common.pro

重点在:finished with non-zero exit value 2. 这里表明了有重复的内容存在。 由于:Android Studio中引入包的方式有如下2种:    compile 'com.android.support:support-v4:22.0.0'    compile files('libs/support-v

Android Studio打开Modem模块出现:The project ‘***‘ is not a Gradle-based project

花了挺长时间处理该问题,特记录如下:1.背景: 在Android studio 下导入一个新增的modem模块,如MPSS.DE.3.1.1\modem_proc\AAA, 目的是看代码方便一些,可以自由搜索各种关键字。但导入该项目时出现了如下错误: The project '***' is not a Gradle-based project.造成的问题: (1) project 下没有代码,而

【硬刚ES】ES基础(二十) 单字符串多字段查询:Dis Max Query

本文是对《【硬刚大数据之学习路线篇】从零到大数据专家的学习指南(全面升级版)》的ES部分补充。

【硬刚ES】ES基础(十九) Query Filtering 与多字符串多字段查询

本文是对《【硬刚大数据之学习路线篇】从零到大数据专家的学习指南(全面升级版)》的ES部分补充。

[LeetCode] 303. Range Sum Query - Immutable

题:https://leetcode.com/problems/range-sum-query-immutable/description/ 题目 Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Given nums

Oracle - ORA-01789: Query block has incorrect number of result columns

一、原因     这个错误一般是在执行表之间的相加(union),相减(minus)等SQL语句时,两个个查询块具有不一致的结果列数所导致的。 二、方案     只要将两段SQL语句的列数调整为一致就可以解决。使用union时,要注意数据库字段的格式要一致,如varchar和nvarchar是不一样的。