You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/11/01 16:51:00 UTC

[jira] [Commented] (ARROW-1652) [JS] Separate Vector into BatchVector and CompositeVector

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

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

TheNeuralBit commented on a change in pull request #1273: ARROW-1652: [JS] housekeeping, vector cleanup
URL: https://github.com/apache/arrow/pull/1273#discussion_r148275559
 
 

 ##########
 File path: js/src/reader/arrow.ts
 ##########
 @@ -47,22 +48,27 @@ export function* readBuffers(...bytes: Array<Uint8Array | Buffer | string>) {
     const dictionaries: Dictionaries = {};
     const byteBuffers = bytes.map(toByteBuffer);
     for (let { schema, batch } of readRecords(...byteBuffers)) {
-        let vectors: Vector<any>[] = [];
+        let vectors: Column<any>[] = [];
         let state = { nodeIndex: 0, bufferIndex: 0 };
-        let index = -1, fieldsLength = schema.fieldsLength();
+        let fieldsLength = schema.fieldsLength();
+        let index = -1, field: Field, vector: Vector<any>;
         if (batch.id) {
             // A dictionary batch only contain a single vector. Traverse each
             // field and its children until we find one that uses this dictionary
             while (++index < fieldsLength) {
-                let vector = readDictionary(schema.fields(index), batch, state, dictionaries);
-                if (vector) {
-                    dictionaries[batch.id] = dictionaries[batch.id] && dictionaries[batch.id].concat(vector) || vector;
-                    break;
+                if (field = schema.fields(index)!) {
 
 Review comment:
   Is the `!` and if-test here necessary because of strict mode?

----------------------------------------------------------------
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:
users@infra.apache.org


> [JS] Separate Vector into BatchVector and CompositeVector
> ---------------------------------------------------------
>
>                 Key: ARROW-1652
>                 URL: https://issues.apache.org/jira/browse/ARROW-1652
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: JavaScript
>            Reporter: Brian Hulette
>            Assignee: Paul Taylor
>            Priority: Major
>              Labels: Performance, pull-request-available
>
> CompositeVector should have a {{batch(..)}} function that returns a BatchVector



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)