@TheNeuralBit @trxcllnt Could you help me make sense of the test failures?
* Where does `f32` come from? I don't see it anywhere else in the code.
* What is the difference between `BoolData`, `FlatData`, `Data`, and `BaseData`
and why is it causing issues?
```
$ gulp test
[21:34:28] Using gulpfile ~/Developer/UW/arrow/js/gulpfile.js
[21:34:28] Starting 'test'...
[21:34:28] Starting 'test:ts'...
FAIL test/unit/table-tests.ts
● Test suite failed to run
TypeScript diagnostics (customize using
`[jest-config].globals.ts-jest.diagnostics` option):
test/unit/table-tests.ts:91:32 - error TS2339: Property 'f32' does not
exist on type 'View<any>'.
91 expect(row.f32).toEqual(expected[F32]);
~~~
test/unit/table-tests.ts:92:32 - error TS2339: Property 'i32' does not
exist on type 'View<any>'.
92 expect(row.i32).toEqual(expected[I32]);
~~~
test/unit/table-tests.ts:93:32 - error TS2339: Property 'dictionary' does
not exist on type 'View<any>'.
93 expect(row.dictionary).toEqual(expected[DICT]);
~~~~~~~~~~
test/unit/table-tests.ts:100:32 - error TS2339: Property 'f32' does not
exist on type 'View<any>'.
100 expect(row.f32).toEqual(expected[F32]);
~~~
test/unit/table-tests.ts:101:32 - error TS2339: Property 'i32' does not
exist on type 'View<any>'.
101 expect(row.i32).toEqual(expected[I32]);
~~~
test/unit/table-tests.ts:102:32 - error TS2339: Property 'dictionary' does
not exist on type 'View<any>'.
102 expect(row.dictionary).toEqual(expected[DICT]);
~~~~~~~~~~
test/unit/table-tests.ts:262:32 - error TS2339: Property 'f32' does not
exist on type 'View<any>'.
262 expect(row.f32).toEqual(expected_row[F32]);
~~~
test/unit/table-tests.ts:263:32 - error TS2339: Property 'dictionary' does
not exist on type 'View<any>'.
263 expect(row.dictionary).toEqual(expected_row[DICT]);
~~~~~~~~~~
FAIL test/unit/vector-tests.ts
● Test suite failed to run
TypeScript diagnostics (customize using
`[jest-config].globals.ts-jest.diagnostics` option):
test/unit/vector-tests.ts:63:35 - error TS2345: Argument of type 'BoolData'
is not assignable to parameter of type 'Data<Bool>'.
Type 'BoolData' is not assignable to type 'BaseData<Bool>'.
Types of property 'clone' are incompatible.
Type '<R extends Bool>(type: R, length?: number, offset?: number,
nullCount?: number) => FlatData<R>' is not assignable to type '<R extends
Bool>(type: R, length?: number, offset?: number, nullCount?: number) =>
Data<R>'.
Type 'FlatData<R>' is not assignable to type 'Data<R>'.
Type 'FlatData<R>' is not assignable to type
'DataTypes<R>[R["TType"]]'.
Type 'FlatData<R>' is not assignable to type 'BoolData'.
Property 'sliceData' is protected but type 'BaseData<T>' is
not a class derived from 'BoolData'.
63 const vector = new BoolVector(new BoolData(new Bool(), n, null, new
Uint8Array([27, 0, 0, 0, 0, 0, 0, 0])));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/unit/vector-tests.ts:84:34 - error TS2345: Argument of type 'BoolData'
is not assignable to parameter of type 'Data<Bool>'.
Type 'BoolData' is not assignable to type 'BaseData<Bool>'.
84 const v = new BoolVector(new BoolData(new Bool(), 3, null, new
Uint8Array([0xFF])));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/unit/vector-tests.ts:88:34 - error TS2345: Argument of type 'BoolData'
is not assignable to parameter of type 'Data<Bool>'.
Type 'BoolData' is not assignable to type 'BaseData<Bool>'.
88 const v = new BoolVector(new BoolData(new Bool(), n, null, new
Uint8Array([27, 0, 0, 0, 0, 0, 0, 0])));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/unit/vector-tests.ts:146:37 - error TS2304: Cannot find name 'Float16'.
146 .map((b) => new FloatVector<Float16>(new FlatData(new
Float16(), b.length, null, b)))
~~~~~~~
test/unit/vector-tests.ts:218:17 - error TS2345: Argument of type
'TypedArrayConstructor<Int32Array> | TypedArrayConstructor<Uint32Array>' is not
assignable to parameter of type 'TypedArrayConstructor<Int32Array>'.
Type 'TypedArrayConstructor<Uint32Array>' is not assignable to type
'TypedArrayConstructor<Int32Array>'.
Type 'Uint32Array' is not assignable to type 'Int32Array'.
Types of property 'copyWithin' are incompatible.
Type '(target: number, start: number, end?: number | undefined) =>
Uint32Array' is not assignable to type '(target: number, start: number, end?:
number | undefined) => Int32Array'.
Type 'Uint32Array' is not assignable to type 'Int32Array'.
218 type.ArrayType,
~~~~~~~~~~~~~~
test/unit/vector-tests.ts:278:17 - error TS2345: Argument of type
'TypedArrayConstructor<Int32Array> | TypedArrayConstructor<Uint32Array> |
TypedArrayConstructor<Ui...' is not assignable to parameter of type
'TypedArrayConstructor<Int32Array>'.
Type 'TypedArrayConstructor<Uint32Array>' is not assignable to type
'TypedArrayConstructor<Int32Array>'.
278 type.ArrayType,
~~~~~~~~~~~~~~
test/unit/vector-tests.ts:333:136 - error TS2345: Argument of type
'FlatData<Int32>' is not assignable to parameter of type 'Data<Int<any,
IntArray>>'.
Type 'FlatData<Int32>' is not assignable to type 'BaseData<Int<any,
IntArray>>'.
Types of property 'clone' are incompatible.
Type '<R extends Int32>(type: R, length?: number, offset?: number,
nullCount?: number) => FlatData<R>' is not assignable to type '<R extends
Int<any, IntArray>>(type: R, length?: number, offset?: number, nullCount?:
number) => ...'.
Types of parameters 'type' and 'type' are incompatible.
Type 'R' is not assignable to type 'Int32'.
Type 'Int<any, IntArray>' is not assignable to type 'Int32'.
Types of property 'TArray' are incompatible.
Type 'IntArray' is not assignable to type 'Int32Array'.
Type 'Uint32Array' is not assignable to type 'Int32Array'.
333 const vector = new DictionaryVector(new DictionaryData(new
Dictionary(dictionary_vec.type, indices_data.type), dictionary_vec,
indices_data));
~~~~~~~~~~~~
test/unit/vector-tests.ts:346:136 - error TS2345: Argument of type
'FlatData<Int32>' is not assignable to parameter of type 'Data<Int<any,
IntArray>>'.
Type 'FlatData<Int32>' is not assignable to type 'BaseData<Int<any,
IntArray>>'.
346 const vector = new DictionaryVector(new DictionaryData(new
Dictionary(dictionary_vec.type, indices_data.type), dictionary_vec,
indices_data));
~~~~~~~~~~~~
test/unit/vector-tests.ts:359:35 - error TS2304: Cannot find name 'Vector'.
359 function basicVectorTests(vector: Vector, values: any[], extras: any[])
{
~~~~~~
PASS test/unit/date-vector-tests.ts (15.534s)
PASS test/unit/int-tests.ts (15.59s)
Test Suites: 2 failed, 2 passed, 4 total
Tests: 40 passed, 40 total
Snapshots: 0 total
Time: 16.398s
Ran all test suites matching /test\/unit\/*/i.
[21:34:45] 'test:ts' errored after 17 s
[21:34:45] Error: exited with error code: 1
at ChildProcess.onexit
(/Users/domoritz/Developer/UW/arrow/js/node_modules/end-of-stream/index.js:39:36)
at ChildProcess.emit (events.js:182:13)
at ChildProcess.EventEmitter.emit (domain.js:460:23)
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
[21:34:45] 'test' errored after 17 s
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this
command.
```
[ Full content available at: https://github.com/apache/arrow/pull/2611 ]
This message was relayed via gitbox.apache.org for [email protected]