2023-07-25 monetdb-relation-关键数据结构-记录

这篇具有很好参考价值的文章主要介绍了2023-07-25 monetdb-relation-关键数据结构-记录。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

摘要:

monetdb-relation-关键数据结构-记录文章来源地址https://www.toymoban.com/news/detail-605770.html

关键数据结构:

expression_type

typedef enum expression_type {
	e_atom,
	e_column,
	e_cmp,
	e_func,
	e_aggr,
	e_convert,
	e_psm
} expression_type;

expression


typedef struct expression {
	expression_type type;	/* atom, cmp, func/aggr */
	sql_exp_name alias;
	void *l;
	void *r;
	void *f;	/* func's and aggr's, also e_cmp may have have 2 arguments */
	unsigned int flag; /* cmp types, PSM types/level */
	unsigned int
	 card:2,	/* card (0 truth value!) (1 atoms) (2 aggr) (3 multi value) */
	 freevar:4,	/* free variable, ie binds to the upper dependent join */
	 intern:1,
	 anti:1,
	 ascending:1,	/* order direction */
	 nulls_last:1,	/* return null after all other rows */
	 zero_if_empty:1, 	/* in case of partial aggregator computation, some aggregators need to return 0 instead of NULL */
	 distinct:1,

	 semantics:1,	/* is vs = semantics (nil = nil vs unknown != unknown), ranges with or without nil, aggregation with or without nil */
	 need_no_nil:1,
	 has_no_nil:1,
	 unique:1,	/* expression has unique values, but it may have multiple NULL values! */

	 base:1,
	 ref:1,		/* used to indicate an other expression may reference this one */
	 used:1,	/* used for quick dead code removal */
	 symmetric:1; /* compare between symmetric */
	sql_subtype	tpe;
	void *p;	/* properties for the optimizer */
} sql_exp;

ddl_statement

typedef enum ddl_statement {
	ddl_output,
	ddl_list,
	ddl_psm,
	ddl_exception,
	ddl_create_seq,
	ddl_alter_seq,
	ddl_drop_seq,
	ddl_alter_table_add_range_partition,
	ddl_alter_table_add_list_partition,
	ddl_release,
	ddl_commit,
	ddl_rollback,
	ddl_trans,
	ddl_create_schema,
	ddl_drop_schema,
	ddl_create_table,
	ddl_drop_table,
	ddl_create_view,
	ddl_drop_view,
	ddl_drop_constraint,
	ddl_alter_table,
	ddl_create_type,
	ddl_drop_type,
	ddl_drop_index,
	ddl_create_function,
	ddl_drop_function,
	ddl_create_trigger,
	ddl_drop_trigger,
	ddl_grant_roles,
	ddl_revoke_roles,
	ddl_grant,
	ddl_revoke,
	ddl_grant_func,
	ddl_revoke_func,
	ddl_create_user,
	ddl_drop_user,
	ddl_alter_user,
	ddl_rename_user,
	ddl_create_role,
	ddl_drop_role,
	ddl_alter_table_add_table,
	ddl_alter_table_del_table,
	ddl_alter_table_set_access,
	ddl_comment_on,
	ddl_rename_schema,
	ddl_rename_table,
	ddl_rename_column,
	ddl_maxops /* evaluated to the max value, should be always kept at the bottom */
} ddl_statement;

operator_type

typedef enum operator_type {
	op_basetable = 0,
	op_table,
	op_ddl,
	op_project,		/* includes order by */
	op_select,
	op_join,
	op_left,
	op_right,
	op_full,
	op_semi,
	op_anti,
	op_union,
	op_inter,
	op_except,
	op_groupby,
	op_topn,
	op_sample,
	op_insert,	/* insert(l=table, r insert expressions) */
	op_update,	/* update(l=table, r update expressions) */
	op_delete,	/* delete(l=table, r delete expression) */
	op_truncate, /* truncate(l=table) */
	op_merge
} operator_type;

relation

typedef struct relation {
	sql_ref ref;

	operator_type op;
	void *l;
	void *r;
	list *exps;
	list *attr; /* attributes: mark-joins return extra attributes */
				/* later put all 'projection' attributes in here, ie for set ops, project/group/table/basetable by
				 * select/ (semi/anti/left/outer/right)join will use exps for predicates
				 * groupby will use exps for group by exps
				 * project can use exps for the order by bits
				 * topn/sample use exps for the input arguments of the limit/sample
				 */
	int nrcols;	/* nr of cols */
	unsigned int
	 flag:16,
	 card:4,	/* 0, 1 (row), 2 aggr, 3 */
	 dependent:1, 	/* dependent join */
	 distinct:1,
	 processed:1,   /* fully processed or still in the process of building */
	 outer:1,	/* used as outer (ungrouped) */
	 grouped:1,	/* groupby processed all the group by exps */
	 single:1;
	/*
	 * Used by rewriters at rel_unnest, rel_optimizer and rel_distribute so a relation is not modified twice
	 * The list is kept at rel_optimizer_private.h Please update it accordingly
	 */
	uint8_t used;
	void *p;	/* properties for the optimizer, distribution */
} sql_rel;

到了这里,关于2023-07-25 monetdb-relation-关键数据结构-记录的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 【CVPR 2023 论文解读】TriDet: Temporal Action Detection with Relative Boundary Modeling

    发表时间:CVPR 2023 作者团队:北航,美团,JD Explore 代码链接: GitHub - dingfengshi/TriDet: [CVPR2023] Code for the paper, TriDet: Temporal Action Detection with Relative Boundary Modeling [CVPR2023] Code for the paper, TriDet: Temporal Action Detection with Relative Boundary Modeling - GitHub - dingfengshi/TriDet: [CVPR2023] Code for t

    2024年02月05日
    浏览(43)
  • 论文阅读《ICDE2023:Relational Message Passing for Fully Inductive Knowledge Graph Completion》

    论文链接 工作简介 在知识图谱补全 (KGC) 中,预测涉及新兴实体和 / 或关系的三元组, 这是在学习 KG 嵌入时看不到的,已成为一个关键挑战。 带有消息传递的子图推理是一个很有前途和流行的解决方案。 最近的一些方法已经取得了很好的性能,但它们 (1) 通常只能预测单独

    2024年02月07日
    浏览(30)
  • 25.【TypeScript 教程】infer 关键字

    本节要介绍的  infer  有些难理解,我们来通过一个类比来帮助理解。 语句  let num  中,通过  let  来声明了一个变量,那怎样声明一个不确定的类型变量呢? 答案是使用  infer  , infer R  就是声明了一个类型变量  R 。 在条件类型表达式中,可以在  extend

    2024年01月23日
    浏览(23)
  • (2023.07.05-2023.07.15)论文阅读简单记录和汇总

    2023/07/05:端午回家还没玩几天就被老板召唤回学校了,采购的事情真是太麻烦了,一堆的差错。昨天跟师弟把他的第一篇论文投出去了,祝好运! 2023/07/10:可惜,师弟的文章五天不到就被拒稿了,不过这也很正常。拒拒更健康,有拒才有得。 (arxiv 2023)COLOR LEARNING FOR IMA

    2024年02月16日
    浏览(30)
  • 2023.07.07面试偏前端angular

    ==和===是JavaScript中的两个比较运算符,用于比较两个值的相等性。 ==是松散相等运算符,它会进行类型转换后再比较值是否相等。如果两个值的类型不同,==会尝试将它们转换为相同的类型,然后再进行比较。例如,1 == \\\'1\\\'会返回true,因为它们在进行比较之前会被转换为相同

    2024年02月13日
    浏览(28)
  • 2023-07-07 LeetCode每日一题(过桥的时间)

    点击跳转到题目位置 共有 k 位工人计划将 n 个箱子从旧仓库移动到新仓库。给你两个整数 n 和 k,以及一个二维整数数组 time ,数组的大小为 k x 4 ,其中 time[i] = [leftToRighti, pickOldi, rightToLefti, putNewi] 。 一条河将两座仓库分隔,只能通过一座桥通行。旧仓库位于河的右岸,新仓

    2024年02月15日
    浏览(33)
  • LeetCode 每日一题 2023/9/25-2023/10/1

    记录了初步解题思路 以及本地实现代码;并不一定为最优 也希望大家能一起探讨 一起进步 9/25 460. LFU 缓存 freqMap 以频率为索引 存放一个双向链表 每个节点存放key,value,freq keyMap 以key为索引存放在freqMap中的位置 9/26 2582. 递枕头 n个人 经过2n-2次回到开始的人 9/27 1333. 餐厅过滤

    2024年02月07日
    浏览(23)
  • 数据结构day07(栈和队列)

    今日任务 head.h fun.c main.c 运行效果: 今日思维导图

    2024年02月10日
    浏览(29)
  • 2023/07/23

    方式一: 方式二:待补充 外层容器给弹性盒子布局, 且给外层盒子一个after伪类元素。 visibility:hidden 将元素隐藏,但是在网页中该占的位置还是占着。 给容器内的盒子宽度按照100%等分,比如每行三个盒子就可以给30%,四个盒子就可以给25%, 高度可以由固定内容撑开最好,也

    2024年02月16日
    浏览(30)
  • 行业追踪,2023-08-07

    凡所有相,皆是虚妄。若见诸相非相,即见如来。 k 线图是最好的老师,每天持续发布板块的rps排名,追踪板块,板块来开仓,板块去清仓,丢弃自以为是的想法,板块去留让市场来告诉你 跟踪板块总结: 成交额超过 100 亿 排名靠前,macd柱由绿转红 成交量要大于均线 有必

    2024年02月14日
    浏览(28)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包