Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Union with empty set results in empty set #709

Closed
oierlauzi opened this issue Feb 10, 2023 · 4 comments
Closed

Union with empty set results in empty set #709

oierlauzi opened this issue Feb 10, 2023 · 4 comments
Assignees
Labels
needs confirmation Review to label and confirm question Further information is requested

Comments

@oierlauzi
Copy link
Collaborator

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 oierlauzi added bug Something isn't working question Further information is requested labels Feb 10, 2023
@oierlauzi oierlauzi self-assigned this Feb 10, 2023
@oierlauzi
Copy link
Collaborator Author

Mathematically this is not correct:
imagen

@albertmena albertmena added needs confirmation Review to label and confirm and removed bug Something isn't working labels Feb 10, 2023
@oierlauzi
Copy link
Collaborator Author

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
Copy link
Collaborator Author

oierlauzi commented Feb 10, 2023

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.

@fede-pe
Copy link
Contributor

fede-pe commented Feb 24, 2023

Fixed #714
Issue closed.

@fede-pe fede-pe closed this as completed Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs confirmation Review to label and confirm question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants