Sync up metadata empty-val indicator with core
x-ref
@@ -327,10 +327,15 @@ cdef object load_metadata(Array array, unpack=True):
if not unpack:
ret_val.append(key)
else:
- # TODO change this after TileDB 1.8 fix
# in this case, the key might exist with empty value
- if value_num == 0:
- unpacked_val = array.meta[key]
+ if (value == NULL) and (value_num == 1):
+ # in this case, the key exists with empty value
+ if value_type == TILEDB_CHAR:
+ unpacked_val = b''
+ elif value_type == TILEDB_STRING_UTF8:
+ unpacked_val = u''
+ else:
+ unpacked_val = ()
else:
unpacked_val = unpack_metadata_val(value_type, value_num, value)
