Changeset: 8caa4f5ed164 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/8caa4f5ed164
Modified Files:
        sql/storage/bat/bat_storage.c
        sql/storage/bat/bat_storage.h
        sql/storage/sql_storage.h
Branch: dict
Log Message:

use proper enum type


diffs (55 lines):

diff --git a/sql/storage/bat/bat_storage.c b/sql/storage/bat/bat_storage.c
--- a/sql/storage/bat/bat_storage.c
+++ b/sql/storage/bat/bat_storage.c
@@ -4352,7 +4352,7 @@ swap_bats(sql_trans *tr, sql_column *col
 }
 
 static int
-col_compress(sql_trans *tr, sql_column *col, int storage_type, BAT *o, BAT *u)
+col_compress(sql_trans *tr, sql_column *col, storage_type st, BAT *o, BAT *u)
 {
        bool update_conflict = false;
        int in_transaction = segments_in_transaction(tr, col->t);
@@ -4368,7 +4368,7 @@ col_compress(sql_trans *tr, sql_column *
        if ((!inTransaction(tr, col->t) && (odelta != d || isTempTable(col->t)) 
&& isGlobal(col->t)) || (!isNew(col->t) && isLocalTemp(col->t)))
                trans_add(tr, &col->base, d, &tc_gc_col, &commit_update_col, 
isTempTable(col->t)?NULL:&log_update_col);
 
-       d->cs.st = storage_type;
+       d->cs.st = st;
        d->cs.cleared = true;
        if (d->cs.bid)
                temp_destroy(d->cs.bid);
diff --git a/sql/storage/bat/bat_storage.h b/sql/storage/bat/bat_storage.h
--- a/sql/storage/bat/bat_storage.h
+++ b/sql/storage/bat/bat_storage.h
@@ -12,12 +12,6 @@
 #include "sql_storage.h"
 #include "bat_logger.h"
 
-typedef enum storage_type {
-       ST_DEFAULT = 0,
-       ST_DICT,
-       ST_FOR,
-} storage_type;
-
 typedef struct column_storage {
        int refcnt;
        int bid;
diff --git a/sql/storage/sql_storage.h b/sql/storage/sql_storage.h
--- a/sql/storage/sql_storage.h
+++ b/sql/storage/sql_storage.h
@@ -194,7 +194,13 @@ typedef int (*drop_del_fptr) (sql_trans 
 
 typedef BUN (*clear_table_fptr) (sql_trans *tr, sql_table *t);
 
-typedef int (*col_compress_fptr) (sql_trans *tr, sql_column *c, int 
storage_type, BAT *offsets, BAT *vals);
+typedef enum storage_type {
+       ST_DEFAULT = 0,
+       ST_DICT,
+       ST_FOR,
+} storage_type;
+
+typedef int (*col_compress_fptr) (sql_trans *tr, sql_column *c, storage_type 
st, BAT *offsets, BAT *vals);
 
 /*
 -- update_table rollforward the changes made from table ft to table tt
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to