Skip to content

Commit 1d4a660

Browse files
committed
Integer/float column parsers should carry their datatypes and widen them -- other types can have more general behavior.
1 parent 5fddec6 commit 1d4a660

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/tech/v3/dataset/io/column_parsers.clj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,9 +518,13 @@
518518
container-ecount (.size container)
519519
logical-ecount (- container-ecount mc)]
520520
;;Setup container
521-
(if (== 0 logical-ecount)
521+
(if (== 0 logical-ecount)
522522
(do
523-
(set! container (column-base/make-container packed-dtype options))
523+
(set! container (column-base/make-container (if (identical? container-dtype :boolean)
524+
packed-dtype
525+
(casting/widest-datatype container-dtype
526+
packed-dtype))
527+
options))
524528
(set! container-dtype val-dtype)
525529
(set! missing-value (column-base/datatype->missing-value packed-dtype)))
526530
;;boolean present a problem here. We generally want to keep them as booleans

0 commit comments

Comments
 (0)