You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by bh...@apache.org on 2019/06/26 14:44:30 UTC

[arrow] branch js-data-buffer-builder-stride created (now 2e4ce7a)

This is an automated email from the ASF dual-hosted git repository.

bhulette pushed a change to branch js-data-buffer-builder-stride
in repository https://gitbox.apache.org/repos/asf/arrow.git.


      at 2e4ce7a  Use stride in DataBufferBuilder.set

This branch includes the following new commits:

     new 2e4ce7a  Use stride in DataBufferBuilder.set

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[arrow] 01/01: Use stride in DataBufferBuilder.set

Posted by bh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bhulette pushed a commit to branch js-data-buffer-builder-stride
in repository https://gitbox.apache.org/repos/asf/arrow.git

commit 2e4ce7af02e4a906c024d1f2cbd213bebd59a527
Author: Brian Hulette <hu...@gmail.com>
AuthorDate: Mon Jun 24 19:47:01 2019 -0700

    Use stride in DataBufferBuilder.set
---
 js/src/builder/buffer.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/js/src/builder/buffer.ts b/js/src/builder/buffer.ts
index b9f7aa4..41f5c70 100644
--- a/js/src/builder/buffer.ts
+++ b/js/src/builder/buffer.ts
@@ -105,7 +105,7 @@ export class DataBufferBuilder<T extends TypedArray> extends BufferBuilder<T, nu
     public get(index: number) { return this.buffer[index]; }
     public set(index: number, value: number) {
         this.reserve(index - this.length + 1);
-        this.buffer[index] = value;
+        this.buffer[index * this.stride] = value;
         return this;
     }
 }