Skip to content
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

Offering: Allow join function to work on a single column #48

Open
jdhedden opened this issue May 9, 2022 · 1 comment
Open

Offering: Allow join function to work on a single column #48

jdhedden opened this issue May 9, 2022 · 1 comment

Comments

@jdhedden
Copy link

jdhedden commented May 9, 2022

The current join function fails if a line of input only has one column (i.e., not an array). The update below allow it to function in that case:

@register("join")
@typed(None, T_STRING)
def join(separator, inp):
    if type(inp) == list:
        separator = dynamic_cast(T_STRING, separator).value
        vals = map(lambda x: T_STRING.create_from(x).value, inp)
        return separator.join(vals)

    return inp   # Only one 'column'
@sharkdp
Copy link
Owner

sharkdp commented May 22, 2022

Thanks. Please see the other tickets regarding the maintenance status of this project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants