-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[JS] Implement list contains predicate #23976
Copy link
Copy link
Closed
Description
As far as I can see there is no way to check if a list contains a specific element.
My code is as follows:
var listChild = new arrow.Field('list[Utf8]', new arrow.Utf8())
var all = arrow.Table.new([
arrow.DateVector.from(dates),
arrow.Int32Vector.from(flumeseqs),
arrow.Utf8Vector.from(keys),
arrow.Vector.from({ values: authors, type: new arrow.Dictionary(new arrow.Utf8(), new arrow.Int32()) }),
arrow.Int32Vector.from(sequences),
arrow.Vector.from({ values: types, type: new arrow.Dictionary(new arrow.Utf8(), new arrow.Int32()) }),
arrow.Vector.from({ values: links, type: new arrow.List(listChild) }),
], ["date", "flumeseq", "key", "author", "sequence", "type", "links"])And I want to get all the items that has a specific element in the links section.
So something like:
var q2 = Array.from(
all.filter(
arrow.predicate.col('links').contains('%GcvjVk+NLsjOB5Vd+vceGXEOeYmHoRA6lgXVJzPuMxw=.sha256')))
Reporter: Anders Rune Jensen
Note: This issue was originally created as ARROW-7738. Please see the migration documentation for further details.
Reactions are currently unavailable