Repository navigation
Change default algorithm in detect columns - #12277
Conversation
|
|
|
Sure! Just renamed it. |
|
I think if we can maybe just refactor the combine columns functionality so it works with the legacy and new algorithm, and add the examples back, we could land this. |
|
if you've added it and it you're good with it, feel free to land this. i'm too tired to study the changes tonight. LOL. 😆 |
|
Ok, it's committed by c07395e Let's land it and see if it works :) |
|
I love that this works so much better. Great job @WindSoilder! ❤️ Thanks for working on this with me! |
|
After trying the latest nightly build, I'm wondering if the previous algorithms may be more widely applicable? Is it a better idea to add the new algorithm as a feature with flag |
|
Do you have some examples show that previous algorithms works better? |
My examples all falls into the pitfalls of the new algorithm such as: git remote -v | detect columns -n
git diff head~2 --numstat | detect columns -n |
|
I'm personally fine with having the new algorithm as I wish there was a better name other than Another thoughtWhat if we keep --guess as the default but if it returns only one column, we automatically try the legacy mode? Is that worth trying @WindSoilder @hustcer ? |
I think it's worth to try, but because we are close to next release, I would prefer to try it after next version |
If we want to keep the new algorithm as default, we'd better rename |
# Description This pr is addressing feedback from #12277 (comment) Currently I think it's fine to replace `--legacy` flag with `--guess` one. Only use `guess_width` algorithm if `--guess` is provided. # User-Facing Changes So it won't be a breaking change to previous version.
Description
@fdncred found another histogram based algorithm to detect columns, and rewrite it in rust: https://github.com/fdncred/guess-width
I have tested it manually, and it works good with
df,docker ps,^ps. This pr is going to use the algorithm indetect columnsFix: #4183
The pitfall of new algorithm:
In this case, users might need to use
--old--legacyto make it works well.User-Facing Changes
User might need to add
--old--legacyto scripts if they finddetect columnsin their scripts broken.Tests + Formatting
Done
After Submitting
NaN