Skip to content

Commit

Permalink
Re-enable empty table dump for table idxs to make sense, add custom e…
Browse files Browse the repository at this point in the history
…rror when compression format is unknown, used to silently ignore
  • Loading branch information
guilledk committed May 12, 2024
1 parent f68ea25 commit 36a5e06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@guilledk/arrowbatch-nodejs",
"version": "1.0.0-rc7",
"version": "1.0.0-rc8",
"description": "Arrow Batch Storage protocol",
"main": "./build/index.js",
"type": "module",
Expand Down
6 changes: 3 additions & 3 deletions src/writer/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,6 @@ function flush(msg: WriterControlRequest) {
* - unfinished: boolean -> is this a .wip or not?
* - writeDir: string -> bucket dir path
*/
if (intermediateSize == 0)
return;

const fileName = `${alias ?? tableName}.ab${msg.params.unfinished ? '.wip' : ''}`;
const currentFile = path.join(msg.params.writeDir, fileName);

Expand Down Expand Up @@ -175,6 +172,9 @@ function flush(msg: WriterControlRequest) {
});
break;
}
default: {
throw new Error(`Unknown compression format ${compression}`);
}
}
});
}
Expand Down

0 comments on commit 36a5e06

Please sign in to comment.