daff
daff copied to clipboard
daff fails to report differences with duplicate column names
Hi @paulfitz ,
I've been trying to use daff 1.4.2 on the command line with csvs that have duplicate column names, and am seeing some strange behaviour, I think similar to those reported by bluunk in https://github.com/paulfitz/daff/issues/61.
Example:
a.csv:
One,Two,Two A,B,B
b.csv:
One,Two,Two A,C,C
daff --fail-if-diff a.csv b.csv exits with code 0
If I change the headers to "One,Two,Three", daff works as expected
If I change A's data row to "A,B,C", daff outputs
! ,(A)
@@,One
but it does exit with code 1
What's the current state around how daff handles duplicate column names? Thanks!
the same as me
root@320a3160c844:/code/bin# cat test/a.csv
level1,newEnCol,fs,fs,123,123,123,123
sfs,1,,,,,,
sfs,2,,fs,,,,
sfs,3,,,,,,
root@320a3160c844:/code/bin# cat test/b.csv
level1,newEnCol,fs,fs,123,123,123,额外列
sfs,1,,,,,,
sfs,2,,fs,,,,
sfs,3,,,,,,
just rename the end 123 col to 额外列, diff output is (I build daff cpp binary)
root@320a3160c844:/code/bin# ./Coopy diff test/a.csv test/b.csv
@@,level1,newEnCol,fs
root@320a3160c844:/code/bin# ./Coopy diff test/a.csv test/b.csv --index
@:@,,A:A,B:B,D:D
,@@,level1,newEnCol,fs
root@320a3160c844:/code/bin#