trxcllnt commented on a change in pull request #8216:
URL: https://github.com/apache/arrow/pull/8216#discussion_r492262537
##########
File path: js/src/data.ts
##########
@@ -253,11 +254,11 @@ export class Data<T extends DataType = DataType> {
return new Data(type, offset, length, nullCount, [undefined,
toArrayBufferView(type.ArrayType, data), toUint8Array(nullBitmap)]);
}
/** @nocollapse */
- public static Binary<T extends Binary>(type: T, offset: number, length:
number, nullCount: number, nullBitmap: NullBuffer, valueOffsets:
ValueOffsetsBuffer, data: Uint8Array) {
+ public static Binary<T extends Binary>(type: T, offset: number, length:
number, nullCount: number, nullBitmap: NullBuffer, valueOffsets:
ValueOffsetsBuffer, data: DataBuffer<T>) {
return new Data(type, offset, length, nullCount,
[toInt32Array(valueOffsets), toUint8Array(data), toUint8Array(nullBitmap)]);
}
/** @nocollapse */
- public static Utf8<T extends Utf8>(type: T, offset: number, length:
number, nullCount: number, nullBitmap: NullBuffer, valueOffsets:
ValueOffsetsBuffer, data: Uint8Array) {
+ public static Utf8<T extends Utf8>(type: T, offset: number, length:
number, nullCount: number, nullBitmap: NullBuffer, valueOffsets:
ValueOffsetsBuffer, data: DataBuffer<T>) {
Review comment:
Yes this argument doesn't have to be a Uint8Array (it could be
null/undefined or [] too).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]