Skip to content

Commit 4d409d3

Browse files
committed
fix: Fold should initialize empty vector with accumulator type.
1 parent 2169068 commit 4d409d3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/DataFrame/Internal/Column.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ foldl1DirectGroups ::
581581
VU.Vector Int ->
582582
Either DataFrameException Column
583583
foldl1DirectGroups f col valueIndices offsets
584-
| VU.length offsets <= 1 = pure $ BoxedColumn @T.Text VB.empty
584+
| VU.length offsets <= 1 = pure $ fromVector @a VB.empty
585585
| otherwise = case col of
586586
UnboxedColumn (vec :: VU.Vector d) -> UnboxedColumn <$> foldl1Worker vec
587587
BoxedColumn (vec :: VB.Vector d) -> BoxedColumn <$> foldl1Worker vec

0 commit comments

Comments
 (0)