@apache-arrow/ts
Advanced tools
Comparing version
@@ -181,6 +181,6 @@ #! /usr/bin/env node | ||
if (state.closed) { break; } else if (!row) { continue; } | ||
if (rowId++ % 350 === 0) { | ||
if (rowId % 350 === 0) { | ||
this.push(`${formatRow(header, maxColWidths, sep)}\n`); | ||
} | ||
this.push(`${formatRow([rowId, ...row.toArray()].map(v => valueToString(v)), maxColWidths, sep)}\n`); | ||
this.push(`${formatRow([rowId++, ...row.toArray()].map(v => valueToString(v)), maxColWidths, sep)}\n`); | ||
} | ||
@@ -187,0 +187,0 @@ } |
@@ -32,3 +32,3 @@ // Licensed to the Apache Software Foundation (ASF) under one | ||
/** @ignore */ | ||
const roundLengthUpToNearest64Bytes = (len: number, BPE: number) => ((((len * BPE) + 63) & ~63) || 64) / BPE; | ||
const roundLengthUpToNearest64Bytes = (len: number, BPE: number) => ((((Math.ceil(len) * BPE) + 63) & ~63) || 64) / BPE; | ||
/** @ignore */ | ||
@@ -52,3 +52,3 @@ const sliceOrExtendArray = <T extends TypedArray | BigIntArray>(arr: T, len = 0) => ( | ||
this.ArrayType = buffer.constructor as ArrayCtor<T>; | ||
this._resize(this.length = Math.trunc(buffer.length / stride)); | ||
this._resize(this.length = Math.ceil(buffer.length / stride)); | ||
} | ||
@@ -62,3 +62,5 @@ | ||
public get byteLength() { return Math.trunc(this.length * this.stride * this.BYTES_PER_ELEMENT); } | ||
public get byteLength() { | ||
return Math.ceil(this.length * this.stride) * this.BYTES_PER_ELEMENT; | ||
} | ||
public get reservedLength() { return this.buffer.length / this.stride; } | ||
@@ -159,27 +161,1 @@ public get reservedByteLength() { return this.buffer.byteLength; } | ||
} | ||
// /** @ignore */ | ||
// export class WideBufferBuilder<T extends TypedArray, R extends BigIntArray> extends BufferBuilder<T, DataValue<T>> { | ||
// public buffer64!: R; | ||
// protected _ArrayType64!: BigIntArrayConstructor<R>; | ||
// public get ArrayType64() { | ||
// return this._ArrayType64 || (this._ArrayType64 = <BigIntArrayConstructor<R>> (this.buffer instanceof Int32Array ? BigInt64Array : BigUint64Array)); | ||
// } | ||
// public set(index: number, value: DataValue<T>) { | ||
// this.reserve(index - this.length + 1); | ||
// switch (typeof value) { | ||
// case 'bigint': this.buffer64[index] = value; break; | ||
// case 'number': this.buffer[index * this.stride] = value; break; | ||
// default: this.buffer.set(value as TypedArray, index * this.stride); | ||
// } | ||
// return this; | ||
// } | ||
// protected _resize(newLength: number) { | ||
// const data = super._resize(newLength); | ||
// const length = data.byteLength / (this.BYTES_PER_ELEMENT * this.stride); | ||
// if (BigIntAvailable) { | ||
// this.buffer64 = new this.ArrayType64(data.buffer, data.byteOffset, length); | ||
// } | ||
// return data; | ||
// } | ||
// } |
{ | ||
"version": "10.0.1", | ||
"version": "11.0.0", | ||
"name": "@apache-arrow/ts", | ||
@@ -4,0 +4,0 @@ "browser": "Arrow.dom.ts", |
@@ -176,10 +176,11 @@ <!--- | ||
[dev-subscribe@arrow.apache.org][1]. Share your ideas and use cases for the | ||
project. | ||
* [Follow our activity on JIRA][3] | ||
project | ||
* Follow our activity on [GitHub issues][3] | ||
* [Learn the format][2] | ||
* Contribute code to one of the reference implementations | ||
We prefer to receive contributions in the form of GitHub pull requests. Please send pull requests against the [github.com/apache/arrow][4] repository. | ||
We prefer to receive contributions in the form of GitHub pull requests. | ||
Please send pull requests against the [github.com/apache/arrow][4] repository. | ||
If you are looking for some ideas on what to contribute, check out the [JIRA | ||
If you are looking for some ideas on what to contribute, check out the [GitHub | ||
issues][3] for the Apache Arrow project. Comment on the issue and/or contact | ||
@@ -190,3 +191,3 @@ [dev@arrow.apache.org](https://mail-archives.apache.org/mod_mbox/arrow-dev/) | ||
If you’d like to report a bug but don’t have time to fix it, you can still post | ||
it on JIRA, or email the mailing list | ||
it on GitHub issues, or email the mailing list | ||
[dev@arrow.apache.org](https://mail-archives.apache.org/mod_mbox/arrow-dev/) | ||
@@ -255,4 +256,4 @@ | ||
[2]: https://github.com/apache/arrow/tree/master/format | ||
[3]: https://issues.apache.org/jira/browse/ARROW | ||
[3]: https://github.com/apache/arrow/issues | ||
[4]: https://github.com/apache/arrow | ||
[5]: https://arrow.apache.org/docs/js/ |
@@ -24,2 +24,3 @@ // Licensed to the Apache Software Foundation (ASF) under one | ||
import { TypedArrayConstructor } from './interfaces.js'; | ||
import { BigInt64Array, BigUint64Array } from './util/compat.js'; | ||
@@ -26,0 +27,0 @@ import { |
@@ -18,2 +18,4 @@ // Licensed to the Apache Software Foundation (ASF) under one | ||
import { BigInt64Array, BigUint64Array } from './compat.js'; | ||
/** @ignore */ const undf = void (0); | ||
@@ -20,0 +22,0 @@ |
@@ -33,2 +33,3 @@ // Licensed to the Apache Software Foundation (ASF) under one | ||
} from './util/chunk.js'; | ||
import { BigInt64Array, BigUint64Array } from './util/compat.js'; | ||
@@ -259,5 +260,5 @@ import { instance as getVisitor } from './visitor/get.js'; | ||
case 1: return data[0].values.subarray(0, length * stride); | ||
default: return data.reduce((memo, { values }) => { | ||
memo.array.set(values, memo.offset); | ||
memo.offset += values.length; | ||
default: return data.reduce((memo, { values, length: chunk_length }) => { | ||
memo.array.set(values.subarray(0, chunk_length * stride), memo.offset); | ||
memo.offset += chunk_length * stride; | ||
return memo; | ||
@@ -264,0 +265,0 @@ }, { array: new ArrayType(length * stride), offset: 0 }).array; |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
257
0.39%884263
-0.1%16158
-0.12%1
Infinity%