Changeset: f7044cc79a70 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f7044cc79a70
Modified Files:
sql/include/sql_relation.h
Branch: Mar2018
Log Message:
Whitespace.
diffs (209 lines):
diff --git a/sql/include/sql_relation.h b/sql/include/sql_relation.h
--- a/sql/include/sql_relation.h
+++ b/sql/include/sql_relation.h
@@ -29,21 +29,21 @@ typedef enum expression_type {
#define CARD_MULTI 3
typedef struct expression {
- expression_type type; /* atom, cmp, func/aggr */
+ expression_type type; /* atom, cmp, func/aggr */
const char *name;
const char *rname;
void *l;
void *r;
- void *f; /* func's and aggr's */
+ void *f; /* func's and aggr's */
/* e_cmp may have have 2 arguments */
- int flag; /* EXP_DISTINCT, NO_NIL, ASCENDING, cmp types */
- unsigned char card; /* card
+ int flag; /* EXP_DISTINCT, NO_NIL, ASCENDING, cmp types */
+ unsigned char card; /* card
(0 truth value!)
- (1 atoms)
+ (1 atoms)
(2 aggr)
(3 multi value)
*/
- sql_subtype tpe;
+ sql_subtype tpe;
int used; /* used for quick dead code removal */
void *p; /* properties for the optimizer */
} sql_exp;
@@ -55,15 +55,15 @@ typedef struct expression {
#define LEFT_JOIN 4
-#define APPLY_JOIN 8
-#define APPLY_LOJ 16
+#define APPLY_JOIN 8
+#define APPLY_LOJ 16
#define APPLY_EXISTS 32
#define APPLY_NOTEXISTS 64
/* ASCENDING > 15 else we have problems with cmp types */
#define ASCENDING 16
#define CMPMASK (ASCENDING-1)
-#define get_cmp(e) (e->flag&CMPMASK)
+#define get_cmp(e) (e->flag&CMPMASK)
#define ANTISEL 32
#define HAS_NO_NIL 64
#define EXP_INTERN 128
@@ -71,7 +71,7 @@ typedef struct expression {
#define UPD_COMP 1
#define UPD_LOCKED 2
#define UPD_NO_CONSTRAINT 4
-
+
#define REL_PARTITION 8
/* We need bit wise exclusive numbers as we merge the level also in the flag */
@@ -86,55 +86,55 @@ typedef struct expression {
#define GET_PSM_LEVEL(level) (level>>8)
/* todo make enum */
-/* ordering is important! see rel2bin_ddl() */
-#define DDL_OUTPUT 1
-#define DDL_LIST 2
-#define DDL_PSM 3
+/* ordering is important! see rel2bin_ddl() and rel_deps() */
+#define DDL_OUTPUT 1
+#define DDL_LIST 2
+#define DDL_PSM 3
-#define DDL_CREATE_SEQ 5
-#define DDL_ALTER_SEQ 6
-#define DDL_DROP_SEQ 7
+#define DDL_CREATE_SEQ 5
+#define DDL_ALTER_SEQ 6
+#define DDL_DROP_SEQ 7
-#define DDL_RELEASE 11
-#define DDL_COMMIT 12
-#define DDL_ROLLBACK 13
-#define DDL_TRANS 14
+#define DDL_RELEASE 11
+#define DDL_COMMIT 12
+#define DDL_ROLLBACK 13
+#define DDL_TRANS 14
-#define DDL_CREATE_SCHEMA 21
-#define DDL_DROP_SCHEMA 22
-#define DDL_CREATE_TABLE 23
-#define DDL_DROP_TABLE 24
-#define DDL_CREATE_VIEW 25
-#define DDL_DROP_VIEW 26
-#define DDL_DROP_CONSTRAINT 27
-#define DDL_ALTER_TABLE 28
-#define DDL_CREATE_TYPE 29
-#define DDL_DROP_TYPE 30
-#define DDL_DROP_INDEX 31
+#define DDL_CREATE_SCHEMA 21
+#define DDL_DROP_SCHEMA 22
+#define DDL_CREATE_TABLE 23
+#define DDL_DROP_TABLE 24
+#define DDL_CREATE_VIEW 25
+#define DDL_DROP_VIEW 26
+#define DDL_DROP_CONSTRAINT 27
+#define DDL_ALTER_TABLE 28
+#define DDL_CREATE_TYPE 29
+#define DDL_DROP_TYPE 30
+#define DDL_DROP_INDEX 31
-#define DDL_CREATE_FUNCTION 41
-#define DDL_DROP_FUNCTION 42
-#define DDL_CREATE_TRIGGER 43
-#define DDL_DROP_TRIGGER 44
+#define DDL_CREATE_FUNCTION 41
+#define DDL_DROP_FUNCTION 42
+#define DDL_CREATE_TRIGGER 43
+#define DDL_DROP_TRIGGER 44
-#define DDL_GRANT_ROLES 51
-#define DDL_REVOKE_ROLES 52
-#define DDL_GRANT 53
-#define DDL_REVOKE 54
-#define DDL_GRANT_FUNC 55
-#define DDL_REVOKE_FUNC 56
-#define DDL_CREATE_USER 57
-#define DDL_DROP_USER 58
-#define DDL_ALTER_USER 59
-#define DDL_RENAME_USER 60
-#define DDL_CREATE_ROLE 61
-#define DDL_DROP_ROLE 62
+#define DDL_GRANT_ROLES 51
+#define DDL_REVOKE_ROLES 52
+#define DDL_GRANT 53
+#define DDL_REVOKE 54
+#define DDL_GRANT_FUNC 55
+#define DDL_REVOKE_FUNC 56
+#define DDL_CREATE_USER 57
+#define DDL_DROP_USER 58
+#define DDL_ALTER_USER 59
+#define DDL_RENAME_USER 60
+#define DDL_CREATE_ROLE 61
+#define DDL_DROP_ROLE 62
-#define DDL_ALTER_TABLE_ADD_TABLE 63
-#define DDL_ALTER_TABLE_DEL_TABLE 64
-#define DDL_ALTER_TABLE_SET_ACCESS 65
+#define DDL_ALTER_TABLE_ADD_TABLE 63
+#define DDL_ALTER_TABLE_DEL_TABLE 64
+#define DDL_ALTER_TABLE_SET_ACCESS 65
-#define DDL_COMMENT_ON 66
+#define DDL_COMMENT_ON 66
#define DDL_EMPTY 100
@@ -144,8 +144,8 @@ typedef enum operator_type {
op_basetable = 0,
op_table,
op_ddl,
- op_project, /* includes order by */
- op_select,
+ op_project, /* includes order by */
+ op_select,
op_join,
op_left,
op_right,
@@ -156,12 +156,12 @@ typedef enum operator_type {
op_union,
op_inter,
op_except,
- op_groupby,
+ 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_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 /* trucante(l=table) */
} operator_type;
@@ -284,18 +284,18 @@ typedef enum operator_type {
#define reset_subquery(rel) \
rel->subquery = 0
-#define rel_is_ref(rel) (((sql_rel*)rel)->ref.refcnt > 1)
+#define rel_is_ref(rel) (((sql_rel*)rel)->ref.refcnt > 1)
typedef struct relation {
sql_ref ref;
- operator_type op;
+ operator_type op;
void *l;
void *r;
- list *exps;
- int nrcols; /* nr of cols */
+ list *exps;
+ int nrcols; /* nr of cols */
unsigned int
- flag:8, /* EXP_DISTINCT */
+ flag:8, /* EXP_DISTINCT */
card:4, /* 0, 1 (row), 2 aggr, 3 */
processed:1, /* fully processed or still in the process of building */
subquery:1; /* is this part a subquery, this is needed for proper
name binding */
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list