You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Anders Rune Jensen (Jira)" <ji...@apache.org> on 2020/02/01 14:31:00 UTC

[jira] [Created] (ARROW-7738) Implement list contains predicate

Anders Rune Jensen created ARROW-7738:
-----------------------------------------

             Summary: Implement list contains predicate
                 Key: ARROW-7738
                 URL: https://issues.apache.org/jira/browse/ARROW-7738
             Project: Apache Arrow
          Issue Type: Improvement
          Components: JavaScript
    Affects Versions: 0.15.1
            Reporter: Anders Rune Jensen


As far as I can see there is no way to check if a list contains a specific element.

My code is as follows:

 
{code:java}
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"])
{code}
And I want to get all the items that has a specific element in the links section.

So something like:

 
{code:java}
var q2 = Array.from(
all.filter(
 arrow.predicate.col('links').contains('%GcvjVk+NLsjOB5Vd+vceGXEOeYmHoRA6lgXVJzPuMxw=.sha256')))
{code}
 

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)