hosswald opened a new issue #9937: URL: https://github.com/apache/druid/issues/9937
I have a column (let's call it cities) containing multi multiple strings each, for example `["amsterdam", "berlin", "barcelona#prague"]` I need to split elements by '#' while still having a flat map, and then get the substring of the first n (let's say n=4) for each value. The first step is done by `STRING_TO_MV(MV_TO_STRING(cities, '#'), '#')`: `["amst", "berl", "barc", "prag"]` But in contrast to what the documentation says, SUBSTRING cannot be applied to the result: `SUBSTRING(STRING_TO_MV(MV_TO_STRING(cities, '#'), '#'), 1, 4)`: `[Lja` (short of `[Ljava.lang.String;@<hash>`) The result is the same for REGEXP_EXTRACT. ### Affected Version In 0.16.1, the result is as above In 0.18.1, the method is also not applied to each value, but to the toString() of the array: `["am` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
