-
I want to provide an array of specs, like [
{ date: '2020-01-01', val: 'a' },
{ date: '2020-01-01', val: 'b' },
] and map/loop filter aq data with these fields such that row's date is @jheer any hints? thank you |
Beta Was this translation helpful? Give feedback.
Answered by
jheer
Dec 16, 2021
Replies: 2 comments 1 reply
-
Hi @jheer . Appreciate any help on this. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I think you want to perform a semijoin with a custom predicate. Here is one possibility: const specs = aq.from([
{ date: new Date('2020-01-01'), val: 'a' },
{ date: new Date('2020-01-01'), val: 'b' }
]);
table.semijoin(specs, (a, b) => a.date < b.date && op.equal(a.val, b.val)) Using a custom predicate will fallback to an O(n*m) nested loop join, so watch out if the product of the table sizes is huge... |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
jheer
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think you want to perform a semijoin with a custom predicate. Here is one possibility:
Using a custom predicate will fallback to an O(n*m) nested loop join, so watch out if the product of the table sizes is huge...