column icon indicating copy to clipboard operation
column copied to clipboard

Support 'AND (... OR ... OR ...)' queries

Open Dreeseaw opened this issue 3 years ago • 4 comments

Introduces WithUnion, which operates similarly to Union, but will allocate a separate bitmap (1) for calculating the multi-OR before applying it to the txn's current index via an AND. This could be used to solve #55.

I'd still like to clean up the bitmap comparison logic and extend the testing to use players

Dreeseaw avatar Jun 17 '22 02:06 Dreeseaw

@kelindar requesting review

In particular, I understand that a goal of this library is to remove allocations in the transaction pipeline as much as possible - however, I don't see a way around it without allocating an arbitrary number of "bonus" index columns during txnPool creation and letting transactions use them as needed.

Dreeseaw avatar Jun 25 '22 23:06 Dreeseaw

Let me know if there's a certain type of test in mind that I'm missing

Dreeseaw avatar Jun 27 '22 01:06 Dreeseaw

Looks like I spoke too soon - the test failure looks adjacent to the issue fixed in your previous PR (#69). I personally run these tests on an Intel MacBook Pro & have also created a test container with Ubuntu to better mock the Github CI, but am not able* to replicate the failure consistently.

Dreeseaw avatar Jun 27 '22 02:06 Dreeseaw

Should https://github.com/kelindar/column/blob/ff08c9690e6be8161032fa94a174646ef211dfb9/txn.go#L517 be locked with the owner's main mutex?

Dreeseaw avatar Jun 27 '22 13:06 Dreeseaw