Open mattjala opened 4 months ago
I think this is working as designed from the HSDS point of view.. Take a look at the h5pyd test here: https://github.com/HDFGroup/h5pyd/blob/master/test/hl/test_vlentype.py#L151. The bytes returned from HSDS in this case (dset is {[], []}) are:
b'\x00\x00\x00\x00\x00\x00\x00\x00'
i.e. 2 elements returned. The 1st element is a zero-length array, the 2nd element also. By contrast, if the vlen dataset had: {[0,]j, [0,]} the bytes returned would be:
b'\x02\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00'
Looks like it's correct when HSDS returns the variable lengths types in binary instead of JSON. Changing the VOL to use binary instead of JSON should be faster for this as well.
When reading from elements in a dataset of variable-length type, uninitialized elements are returned as scalars. With the library API, uninitialized vlen types are considered to be length-zero arrays.
Test program in C to generate an erroneous response from HSDS using the REST VOL:
Server response:
Expected response: