mitdbg / aurum-datadiscovery

MIT License
74 stars 49 forks source link

api.intersection() returns the results in the first object #120

Closed qahtanaa closed 6 years ago

qahtanaa commented 6 years ago

When using: res_drs = api.intersection(table_drs1, table_drs2) the results will be returned in the table_drs1 object.

It is better to define a temporary DRS object in the function (apiutils.py): 458: def intersection(self, drs):

and return the results in that temp object without overwriting the table_drs1 object.

raulcf commented 6 years ago

This is duplicated with #104 The fix you propose sounds good. The caveat is to make sure that the provenance is not broken. That may require using "absorb_provenance" on the temporal object before returning. Please, feel free to do the fix and create a pull request ;)