Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] mlr stats1 prints nothing when two maybe-missing fields specified #79

Closed
Komosa opened this issue Oct 24, 2015 · 3 comments
Closed

Comments

@Komosa
Copy link

Komosa commented Oct 24, 2015

input:

a=1
b=2

cat input | mlr stats1 -a sum -f a:

a_sum=1.000000

but cat input | mlr stats1 -a sum -f a,b gives empty output

@johnkerl
Copy link
Owner

This is intentional -- it ignores records unless they have all aggregation fields. But the design should be changed to handle records which have any of the specified fields.

@johnkerl
Copy link
Owner

Fixed in head & will go out with the 2.3.2 release.

$ cat input
a=1
b=2

$ cat input | mlr stats1 -a sum -f a
a_sum=1.000000

$ cat input | mlr stats1 -a sum -f b
b_sum=2.000000

$ cat input | mlr stats1 -a sum -f a,b
a_sum=1.000000,b_sum=2.000000

Similarly fixed are mlr stats2 and mlr step. There is some separate work yet to be done on mlr join.

Thanks for reporting this -- it had been in the back of my brain for some time, but I hadn't gotten round to doing anything about it. :)

@johnkerl johnkerl removed the active label Oct 27, 2015
@johnkerl
Copy link
Owner

johnkerl commented Nov 4, 2015

Above I wrote "There is some separate work yet to be done on mlr join" -- #82.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants