Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pkg/transformers/stats1.go
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,9 @@ func (tr *TransformerStats1) ingestWithValueFieldRegexes(
// The accumulator has been initialized with default values;
// continue here. (If we were to continue outside of this loop
// we would be failing to construct the accumulator.)
continue
if accumulatorName != "null_count" {
continue
}
}
namedAccumulator.Ingest(valueFieldValue)
}
Expand Down
1 change: 1 addition & 0 deletions test/cases/verb-stats1-regexed-field-names/0008/cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mlr --icsv --ifs "|" --oxtab stats1 -a null_count --fr ".*" test/input/null-count-pipe.csv
Empty file.
4 changes: 4 additions & 0 deletions test/cases/verb-stats1-regexed-field-names/0008/expout
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Id_null_count 0
Type_null_count 3
Other Type_null_count 1
Number_null_count 0
4 changes: 4 additions & 0 deletions test/input/null-count-pipe.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Id|Type|Other Type|Number
a||foo|1
b||bar|2
c|||1
Loading