Union with empty set results in empty set
oierlauzi opened this issue · 4 comments
oierlauzi commented
Performing xmipp_metadata_utility -i <md1> --set union <md2>
with <md1>
being an empty set and <md2>
being a non-empty set results in an empty set. union_all
also does the same. I don't know if this behavior is for some reason or it is a bug.
oierlauzi commented
oierlauzi commented
Here is a minimal case:
md1.xmd
:
data_noname
loop_
_itemId
md2.xmd
:
data_noname
loop_
_itemId
1
2
3
4
xmipp_metadata_utility -i md1.xmd --set union md2.xmd
:
data_noname
loop_
_itemId
xmipp_metadata_utility -i md2.xmd --set union md1.xmd
: (OK)
data_noname
loop_
_itemId
1
2
3
4
oierlauzi commented
In fact, when adding -o <mdOut>
parameter, the output file is not created if the input is empty. This is the actual root cause of the previous problem. For any empty input metadata, the output is not created, regardless of the operation performed.