BAT sizes and indices are of type BUN.  Not size_t. Also, you print BUN using BUNFMT and size_t using SZFMT, not %d.
BAT sizes and indices are of type BUN.  Not size_t.
Also, you print BUN using BUNFMT and size_t using SZFMT, not %d.

zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb