Small description
fixed format gets an extra leading column with header&column value '[1]' in the UI. It looks like the value might an array with a string that is input the line.
Expected result
No extra column
Actual result with screenshot
No stack trace. If this is not reproducible I'll work on getting a screenshot.
(echo "WXYZaXYZbXYZc" ; echo "WXYZdWXYZeWXYZf" ; echo "WXYZgggZhhhZiiii") | sed -e "s/[A-Z]/ /g" | vd -f fixed --fixed-rows=3 -
Saving the output to csv loses the extra leading column.
Steps to reproduce with sample data and a .vd
(echo "WXYZaXYZbXYZc" ; echo "WXYZdWXYZeWXYZf" ; echo "WXYZgggZhhhZiiii") | sed -e "s/[A-Z]/ /g" | vd -f fixed --fixed-rows=3 -
Saving the output to csv loses the extra leading column.
Additional context
HEAD version of develop.
Thanks for the bug report @frosencrantz!
I have been able to reproduce this with ls -al | vd -f fixed.
This is the commit of origin for the issue 78944377ee6874969a05b07000a01dd27907b3aa.
This is interesting, thanks for the bug report @frosencrantz. 7894437 was to make it easier to debug loaders which clear columns but for whatever reason don't add any useful columns. This was the issue with the jsonl loader, if it was given arrays instead of hashmaps. With 7894437 at least it kept the raw column and showed the rows as their raw objects.
This apparently keeps the raw column in the fixed loader, because the fixed sheet is asked to draw itself before the loader has added its own columns. Probably the right fix in this case is to change the code added in 7894437 to only add the raw column if options.debug. Then we revert back to the nicer behavior but keep the ability to debug loaders when they go awry.
Should be fixed, let us know if it doesn't work or if similar issues arise in the future.
Most helpful comment
This is interesting, thanks for the bug report @frosencrantz. 7894437 was to make it easier to debug loaders which clear
columnsbut for whatever reason don't add any useful columns. This was the issue with the jsonl loader, if it was given arrays instead of hashmaps. With 7894437 at least it kept the raw column and showed the rows as their raw objects.This apparently keeps the raw column in the fixed loader, because the fixed sheet is asked to draw itself before the loader has added its own columns. Probably the right fix in this case is to change the code added in 7894437 to only add the raw column if
options.debug. Then we revert back to the nicer behavior but keep the ability to debug loaders when they go awry.