Changeset: 5ec3fbb8747d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/5ec3fbb8747d
Modified Files:
        sql/server/rel_dump.c
        sql/storage/bat/bat_storage.c
Branch: persistent_sketches
Log Message:

call


diffs (38 lines):

diff --git a/sql/server/rel_dump.c b/sql/server/rel_dump.c
--- a/sql/server/rel_dump.c
+++ b/sql/server/rel_dump.c
@@ -386,7 +386,7 @@ exp_print(mvc *sql, stream *fout, sql_ex
                /* don't show properties on value lists */
                if (decorate && e->p && e->type != e_atom && !exp_is_atom(e)) {
                        for (prop *p = e->p; p; p = p->p) {
-                               if (p->kind != PROP_MIN && p->kind != PROP_MAX 
&& p->kind != PROP_NUNIQUES && p->kind != PROP_SELECTIVITY) {
+                               if (sql->show_all_details || (p->kind != 
PROP_MIN && p->kind != PROP_MAX && p->kind != PROP_NUNIQUES && p->kind != 
PROP_SELECTIVITY)) {
                                        char *pv = propvalue2string(ta, p);
                                        mnstr_printf(fout, " %s %s", 
propkind2string(p), pv);
                                }
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
@@ -3002,12 +3002,16 @@ col_stats(sql_trans *tr, sql_column *c, 
                                        *unique = bi.key;
                                        *unique_est = bi.unique_est;
                                        if (*unique_est == 0 && bi.count) {
-                                               uint8_t 
tmp_sketch[BUCKETS][CLZ_BUCKETS] = {0};
-                                               if (bat_sketch(&bi, NULL, 
tmp_sketch) != GDK_SUCCEED)
-                                                       *unique_est = -1;
-                                               else {
-                                                       /* printf("col_stats 
estimating for bat id %d\n", b->batCacheid); */
-                                                       *unique_est = 
sketch_estimate(tmp_sketch);
+                                               if (bi.b->tsketch) {
+                                                       *unique_est = 
sketch_estimate((uint8_t (*)[CLZ_BUCKETS]) bi.b->tsketch->base);
+                                               } else {
+                                                       uint8_t 
tmp_sketch[BUCKETS][CLZ_BUCKETS] = {0};
+                                                       if (bat_sketch(&bi, 
NULL, tmp_sketch) != GDK_SUCCEED)
+                                                               *unique_est = 
-1;
+                                                       else {
+                                                               /* 
printf("col_stats estimating for bat id %d\n", b->batCacheid); */
+                                                               *unique_est = 
sketch_estimate(tmp_sketch);
+                                                       }
                                                }
                                        }
                                } else if (d->cs.st == ST_DICT && (off = 
bind_col_no_view(tr, c, QUICK))) {
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to