[ 
https://issues.apache.org/jira/browse/ARROW-2144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16361594#comment-16361594
 ] 

ASF GitHub Bot commented on ARROW-2144:
---------------------------------------

trxcllnt commented on a change in pull request #1599: ARROW-2144: [JS] Don't 
repeat dictionary lookups in DataFrame ops
URL: https://github.com/apache/arrow/pull/1599#discussion_r167719314
 
 

 ##########
 File path: js/src/vector.ts
 ##########
 @@ -414,6 +414,16 @@ export class DictionaryVector<T extends DataType = 
DataType> extends Vector<Dict
     }
     public getKey(index: number) { return this.indicies.get(index); }
     public getValue(key: number) { return this.dictionary.get(key); }
+    public reverseLookup(value: T): number|undefined {
 
 Review comment:
   @TheNeuralBit I think this is in the right place, since it's specific to 
DictionaryVectors. The View interface is intended to provide a minimal common 
interface for views over the the Vector buffer layouts (aka the Vector Data 
types), somewhat analogously to the DataView/TypedArray relationship with 
ArrayBuffer.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [JS] Don't repeat dictionary lookups in DataFrame ops
> -----------------------------------------------------
>
>                 Key: ARROW-2144
>                 URL: https://issues.apache.org/jira/browse/ARROW-2144
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: JavaScript
>            Reporter: Brian Hulette
>            Priority: Major
>              Labels: pull-request-available
>
> Currently we repeat dictionary lookups every time we bind a new record batch 
> when doing an equality check in a DataFrame op 
> (https://github.com/apache/arrow/blob/master/js/src/predicate.ts#L143).
> In most cases the dictionary won't be changing between record batches, so we 
> should remember these reverse dictionary lookups, either permanently, or at 
> least for the duration of the current operation.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to