You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
iomicifikko opened this issue
Apr 9, 2024
· 2 comments
Labels
grelThe default expression language, GREL, could be improved in many ways!Type: BugIssues related to software defects or unexpected behavior, which require resolution.
Browser Version: Chrome 123.0.6312.106 (Build ufficiale) (a 64 bit)
OpenRefine: 3.7.9 with builtin java
The text was updated successfully, but these errors were encountered:
iomicifikko
added
Status: Pending Review
Indicates that the issue or pull request is awaiting review by project maintainers or collaborators
Type: Bug
Issues related to software defects or unexpected behavior, which require resolution.
labels
Apr 9, 2024
wetneb
added
the
grel
The default expression language, GREL, could be improved in many ways!
label
Apr 9, 2024
Other strange behaviors of the JOIN() function with blank / null / empty string values
Image 1
Image 2
Image 3
In my opinion the occurencies of the separator character (the pipe, in the three images above) inside the final string should always be equal to the length of the original array minus one (3 -1 = 2, in the three images above).
The user can easily exclude if necessary any particular values (blanks, nulls...) using the FILTER function on the array before using the JOIN function.
Thanks for the reports. If I could make a request, it would make it much easier to reproduce/fix the issues if you were to:
provide the GREL expression and expected result as text rather than an image
strip the examples down to the minimum which reproduces the issue (for example, it isn't clear in your last set of examples with the problem is with join() or forEach()
put different problems into separate bug reports - this seems to be an amalgam of issues with string concatenation (or with?), join, and, perhaps, forEach. The additional complexity of having them altogether will make it harder for someone to tackle any of the issues.
OpenRefine's treatment of null values has been a little bit uneven (and evolving), as I mentioned in your #3290, which seems like it has a fair bit of overlap with this.
grelThe default expression language, GREL, could be improved in many ways!Type: BugIssues related to software defects or unexpected behavior, which require resolution.
Examples
The following code
with("banana", fruit1, with (null, fruit2, fruit1 + ", " + fruit2))
returns
null
instead of
banana,
The following code
["banana", null, "apple"].join(", ")
returns
banana, apple
instead of
banana, , apple
Reference
https://github.com/OpenRefine/OpenRefine/wiki/Recipes#merging-several-columns
Versions
The text was updated successfully, but these errors were encountered: