I think I’ve found a bug in the arrayReverse function in the Column Expression node, and I just wanted to check I wasn’t missing something.
It looks like when you use the function on a column containing a list, it gives you the same list in reverse order. But, if you reference the same column in a later expression, you get the reversed version. This does not occur when you click the ‘Evaluate’ button, only when you run the node.
I’m attaching a simple workflow that shows what I mean. It starts with single column called ‘Values’, containing the list [1,2,3,4,5]. This feeds into a column expression node containing 4 expressions, all collections:
- Values 1:
- The expression is ‘column(“Values”)’.
- Clicking ‘Evaluate’ gives [1,2,3,4,5].
- When run, it outputs [1,2,3,4,5].
- Values Reversed 1:
- The expression is ‘arrayReverse(column(“Values”))’.
- Clicking ‘Evaluate’ gives [5,4,3,2,1].
- When run, it outputs [5,4,3,2,1].
- Values 2:
- The expression ‘column(“Values”)’.
- Clicking ‘Evaluate’ gives [1,2,3,4,5].
- When run, it outputs [5,4,3,2,1].
- Values Reversed 2.
- The expression is ‘arrayReverse(column(“Values”))’.
- Clicking ‘Evaluate’ gives [5,4,3,2,1].
- When run, it outputs [1,2,3,4,5].
Even though the last two expressions are exactly the same as the first two, they give different results.
arrayReverseStrangeness.knwf (8.4 KB)