Skip to content

Commit

Permalink
fix: Fix Arrow date millis builder. (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
jheer committed Jun 15, 2021
1 parent 29467a0 commit b0e03f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/arrow/builder/date-millis-builder.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { array } from './util';

export default function(type, length) {
const data = array(type.ArrayType, length);
const data = array(type.ArrayType, length << 1);
return {
set(value, index) {
const i = index << 1;
Expand Down
8 changes: 7 additions & 1 deletion test/arrow/data-from-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@ function dateTest(t, type) {
date(2000, 0, 1),
date(2004, 10, 12),
date(2007, 3, 14),
date(2009, 6, 26)
date(2009, 6, 26),
date(2000, 0, 1),
date(2004, 10, 12),
date(2007, 3, 14),
date(2009, 6, 26),
date(2000, 0, 1),
date(2004, 10, 12)
];
valueTest(t, type, values, ', without nulls');
valueTest(t, type, [null, ...values, undefined], ', with nulls');
Expand Down

0 comments on commit b0e03f0

Please sign in to comment.