Skip to content

Commit

Permalink
Fix table with null values
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Jan 16, 2024
1 parent 79ddb30 commit a2dd54c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ public Output execute(final Input values, final ExecutionContext context) throws
// check if there are columns with mixed int and bigdecimal values
HashSet<String> toCorrect = new HashSet<>();
for (Map.Entry<String, Class<?>> entry : columns.entrySet()) {
if (entry.getValue().equals(Integer.class)) {
if (entry.getValue() != null && entry.getValue().equals(Integer.class)) {
for (Map<String, ?> row : table) {
if (row.get(entry.getKey()) instanceof BigDecimal) {
toCorrect.add(entry.getKey());
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@
["347352116", "Mirabeau"]
]
}
},
{
"title": "Table with int, float and null values",
"table": {
"columns": ["int", "float", "null"],
"data": [
[337907707, 337907707.5, null],
[337907710, 337907710.4, null]
]
}
}
]
}
Expand Down

0 comments on commit a2dd54c

Please sign in to comment.