frostdb icon indicating copy to clipboard operation
frostdb copied to clipboard

Add array operations

Open brancz opened this issue 3 years ago • 2 comments

While repeated types are now supported (#72) for writing and reading, they lack the ability to be filtered in more expressive ways than exact array matches (==) and not matches (!=). I don't think I have thought through the APIs enough yet for this, but one thought I've had is something like:

logicalplan.Col("values").Any().Eq(logicalplan.Literal(5)))

In this example, the table has a column called values, which is an array of integers, and the filter would keep only those rows whose values contain 5.

I'm not sure I'm satisfied with the API, but I wanted to open this issue to at least drop my thoughts here.

brancz avatar May 25 '22 08:05 brancz

What do you think about adding a specific method for this, such as ContainsAny() (a ContainsAll() method could be also added)?

ostafen avatar May 25 '22 08:05 ostafen

I think that makes sense! A use case we've also thought about is contiguous (and non-contiguous) subsets. For example in stacktraces where we have a stacktrace [A, B, C], so we can filter those where there is a direct A->B relationship (contiguous) or a (non-contiguous) A->C relationship. I think these could be handled via separate keywords though.

brancz avatar May 25 '22 14:05 brancz

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jan 06 '24 01:01 github-actions[bot]