[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Numerical field labels and --header-in
From: |
Tim Rice |
Subject: |
Re: Numerical field labels and --header-in |
Date: |
Fri, 20 May 2022 04:13:12 +0000 |
Hey Dima,
0 1 2
1.1 2.2 3.3
Then 'datamash --header-in sum 1' returns 1.1 and NOT 2.2. This sucks.
Oh yeah, good catch.
If header names are available, those thould be the only way to reference
fields.
I'm afraid this would break a lot of backwards compatibility.
If a non-numeric field is given (say, to sum), it will still find the header
name. This implies both code paths must be available, but the wrong one is
being preferred.
It should be easy to swap the order so that if there is a collision between
column numbers and column names, the name will be preferred? I would feel more
confident that this won't break backwards compatibility. At least, not as much.
~ Tim