Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen committed Oct 18, 2024
1 parent 1e477fd commit 74cdc15
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions modules/json/test/lib/clarinet/clarinet.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ test('clarinet#generic', (t) => {
// /\t|\n|\r| / means on whitespace
// '' means on every char
for (const sep in seps) {
t.comment('[' + key + '] should be able to parse -> ' + sep);
// t.comment('[' + key + '] should be able to parse -> ' + sep);
generic(t, key, false, sep);
}
}
Expand All @@ -820,7 +820,7 @@ test('#pre-chunked', (t) => {
continue;
}

t.comment('[' + key + '] should be able to parse pre-chunked');
// t.comment('[' + key + '] should be able to parse pre-chunked');
generic(t, key, true);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,9 @@ export class ArrowTableBuilder {
_getArrowRecordBatch(): arrow.RecordBatch {
const {arrowBuilders, arrowSchema} = this;
const arrowDatas = arrowBuilders.map((builder) => builder.flush());
arrowBuilders.forEach((builder) => builder.finish());

const structField = new arrow.Struct(arrowSchema.fields);
const arrowStructData = new arrow.Data(structField, 0, length, 0, undefined, arrowDatas);
const arrowStructData = new arrow.Data(structField, 0, arrowDatas[0].length, 0, undefined, arrowDatas);
const arrowRecordBatch = new arrow.RecordBatch(arrowSchema, arrowStructData);
return arrowRecordBatch;
}
Expand Down
3 changes: 2 additions & 1 deletion modules/shapefile/test/dbf-arrow-loader.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const SHAPEFILE_JS_TEST_FILES = [
'utf8-property'
];

test('Shapefile JS DBF tests', async (t) => {
test.only('Shapefile Arrow DBF tests', async (t) => {
for (const testFileName of SHAPEFILE_JS_TEST_FILES) {
const encoding = testFileName === 'latin1-property' ? 'latin1' : 'utf8';
const options = {worker: false, dbf: {encoding}};
Expand All @@ -40,6 +40,7 @@ test('Shapefile JS DBF tests', async (t) => {

const table = await parse(body, DBFArrowLoader, options);

debugger
for (let i = 0; i < features.length; i++) {
const row = table.data.get(i)!.toJSON();
t.deepEqual(row, features[i].properties, testFileName);
Expand Down

0 comments on commit 74cdc15

Please sign in to comment.