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
Trying to sort as number a column that contains empty string throws an error #1689
Comments
@ettorerizza No, we don't want empty cells to behave as null cells in the general case. We changed that behavior with Owen's work. There is now an expectation by OpenRefine after Owen's change that when you "Sort by Number", that the column is full of numbers only. How do you wish to highlight to the user that "Hey dude, actually, your column that you asked me to sort is not only numbers...you need to fix that first" ? My vote would be to have a popup warning and suggest to the user to FIRST run Facet by Null and Facet by Blank to inspect those rows in the column. Recall that we also agreed that later we will add an import option (perhaps preference) to "treat blank cells as null cells" instead of ramming it down a users throat as we did prior to 3.0 all the way back to 1.0. But before we add that option, we are waiting for Antonin's work and a nicer UI. For now, we are kinda just getting by as much as we can...knowing that larger, cleaner, smarter ways of working in OpenRefine are coming. |
It's a genuine bug, we should not be failing like this… |
@wetneb It is useful to have the reasons when classifying a bug or not. Can you further state your reasoning why you think this is a bug? Can you refer to my reasons why I classify this as NOT A BUG and state your counter positions ? This will help us have a fuller understanding of expectations from different points of view. Jacky, Owen, and Martin might bring further expectations, so let's see where we all stand on this. Thanks. |
@thadguidry @wetneb I will not meddle with the question of whether it is a bug or not. Let's say I understand both points of view. My 2cts to feed the reflexion: Martin's latest survey showed that the majority of users came from the worlds of library and journalism, not computer science. I've been both in my career, and I'm not sure I'll be able to explain, if anyone wonders in the Google group, why he/she manages to sort some columns and not others simply because some cells that he/she thinks are empty are not empty, but contains an empty string (and why any null cell on which you click on "edit" automatically becomes an empty string). |
I also don't see any changes from Jacky or Owen on isNonBlankData , which the process uses @wetneb @ettorerizza I'm also wondering Where this bug was introduced ? The general argument as I see it is this:
|
@thadguidry it's clearly a bug because running an operation should not fail with an exception. Period. Concerning the desired behaviour, the UI is designed to treat blank values uniformly, by letting the user decide where they should appear in the results, so the backend should agree with that. |
Importing my example as a CSV with the default settings will not trigger the bug, you need to make sure the empty cell is treated as an empty string and not a null (which is the default behaviour). |
Describe the bug
A column that contains numbers and null values can be sorted as a number column, but not if it contains empty strings.
Current Results
Expected behavior
Empty strings should behave like null.
Desktop (please complete the following information):
OpenRefine (please complete the following information):
OpenRefine 3.0 RC1
Datasets
clipboard.openrefine.tar.gz
The text was updated successfully, but these errors were encountered: