Fix `dataset.getall()` shows `DictTuple()` when there are no datasets
Issue: https://github.com/OpenMined/Heartbeat/issues/1685
Before:
Hi @kiendang, I tried to make an empty table with no rows when there are no datasets as we discussed, however, this is challenging since we need an object in the DictTuple iterable so we can grab that object and find its _coll_repr_ (in the _create_table_rows() function. However, when the DictTuple is empty, we don't have any objects.
For now, I make the DictTuple's repr to be an empty list when there are no items inside, like in the picture
This will make the repr consistent with other APIs when the results are empty:
I see. We do need a refactoring of _coll_repr_ to be able to display an empty table. I still think it is the desirable behavior, but let me check with product. For now I think let's display 0 records instead of []. A DictTuple is not a list and showing [] is misleading.