Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Implement Set Operators for Box Types #21

Open
6 tasks
chaitan94 opened this issue Aug 12, 2020 · 0 comments
Open
6 tasks

Implement Set Operators for Box Types #21

chaitan94 opened this issue Aug 12, 2020 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers Hacktoberfest help wanted Extra attention is needed

Comments

@chaitan94
Copy link
Member

• +: Union of the bounding boxes
• *: Intersection of the bounding boxes

We can override the respective operators in both C++ and Python
Invalid operations should throw accordingly

Todo Checklist

  • TBox, TBox
    • Union
    • Intersection
  • STBox, STBox
    • Union
    • Intersection

MobilityDB queries for reference/test cases

mobilitydb=# select intrange '[10, 20)' + '[15, 40)';
 ?column? 
----------
 [10,40)
(1 row)

mobilitydb=# select intrange '[10, 20)' * '[15, 40)';
 ?column? 
----------
 [15,20)
(1 row)

mobilitydb=# select intrange '[10, 20)' - '[15, 40)';
 ?column? 
----------
 [10,15)
(1 row)

mobilitydb=# select intrange '[10, 20)' + '[30, 40)';
ERROR:  result of range union would not be contiguous
@chaitan94 chaitan94 added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Aug 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers Hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant