fix for by making appendObj for doubles handle BigDecimals
@@ -29,6 +29,7 @@ import tech.tablesaw.columns.numbers.DoubleColumnType;
import tech.tablesaw.columns.numbers.NumberColumnFormatter;
import tech.tablesaw.selection.Selection;
+import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
@@ -482,6 +483,13 @@ public class NumberColumnTest {
assertEquals(doubles.name(), empty.name());
}
+ @Test
+ public void appendObject() {
+ DoubleColumn doubles = DoubleColumn.create("doubles");
+ doubles.appendObj(BigDecimal.valueOf(1));
+ assertEquals(1.0, doubles.get(0), 0.00001);
+ }
+
@Test
public void testSize() {
int size = 100;
