druid
druid copied to clipboard
string_to_array ordering
Affected Version
0.17
Description
When using the function string_to_array
on ingest the ordering of the resulting arrays seems random. I would expect the array elements to keep the order they had in the constituting string. Is this to be expected / by design?
Example:
Function Call Result
string_to_array("A_B_C", "_") ["C", "B", "A"]
string_to_array("D_E_F", "_") ["E", "D", "F"]
string_to_array("A_B", "_") ["A", "B"]
string_to_array("A_B_B_C", "_") ["A", "C", "B", "B"]
Desired result:
Function Call Result
string_to_array("A_B_C", "_") ["A", "B", "C"]
string_to_array("D_E_F", "_") ["D", "E", "F"]
string_to_array("A_B", "_") ["A", "B"]
string_to_array("A_B_B_C", "_") ["A", "B", "B", "C"]
This issue has been marked as stale due to 280 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the [email protected] list. Thank you for your contributions.
using 0.21.1 (unified console shows 0.20.0), when I add a transformation using the web console, I get "null" as a result...
if use a column as the first argument I get weird output.
(can't upload image anymore (damned GH))
But somethig like : string_to_array(log, "_")
return a column with something like : [ , , , , , , , ...1077 omitted..., x, x, z]
This issue is no longer marked as stale.
@setop try the delimiter with single quotes. like string_to_array(log, '_')
This issue has been marked as stale due to 280 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the [email protected] list. Thank you for your contributions.
This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.