- FOR_EACH_MAPPED_COLUMN(i, t, cd) {
- ret = map_column(t, i);
- if (ret < 0)
- goto err;
+ FOR_EACH_COLUMN(i, t->desc, cd) {
+ if (cd->storage_type == OSL_NO_STORAGE)
+ continue;
+ column_name_hash(t, cd->name, t->columns[i].name_hash);
+ if (num_rows > 0 && cd->storage_type == OSL_MAPPED_STORAGE) {
+ ret = map_column(t, i);
+ if (ret < 0)
+ goto err;
+ }