Open chaitan94 opened 4 years ago
• +: Union of the time values • *: Intersection of the time values • -: Difference of the time values
We can override the respective operators in both C++ and Python Invalid operations should throw accordingly
mobilitydb=# select period '[2020-01-01, 2020-01-10]'; period -------------------------------------------------- [2020-01-01 00:00:00+00, 2020-01-10 00:00:00+00] (1 row) mobilitydb=# select period '[2020-01-01, 2020-01-10]' + '[2020-01-08, 2020-01-10]'; ?column? ---------------------------------------------------- {[2020-01-01 00:00:00+00, 2020-01-10 00:00:00+00]} (1 row) mobilitydb=# select period '[2020-01-01, 2020-01-10]' + '[2020-01-08, 2020-01-12]'; ?column? ---------------------------------------------------- {[2020-01-01 00:00:00+00, 2020-01-12 00:00:00+00]} (1 row) mobilitydb=# select period '[2020-01-01, 2020-01-10]' + '[2020-01-18, 2020-01-20]'; ?column? ------------------------------------------------------------------------------------------------------ {[2020-01-01 00:00:00+00, 2020-01-10 00:00:00+00], [2020-01-18 00:00:00+00, 2020-01-20 00:00:00+00]} (1 row)
• +: Union of the time values • *: Intersection of the time values • -: Difference of the time values
We can override the respective operators in both C++ and Python Invalid operations should throw accordingly
Todo Checklist
Sample MobilityDB queries for reference/test cases