Skip to content

Conversation

@ueshin
Copy link
Member

@ueshin ueshin commented Mar 22, 2023

What changes were proposed in this pull request?

This is a follow-up of #38947.

Add array_prepend function to Spark Connect Python client.

Why are the changes needed?

array_prepend was added at #38947 without Spark Connect Python client.

Does this PR introduce any user-facing change?

array_prepend will be available in Spark Connect Python client.

How was this patch tested?

Enabled the related test.

@zhengruifeng
Copy link
Contributor

would you mind adding a simple test here?

# test array_append
self.assert_eq(
cdf.select(CF.array_append(cdf.a, "xyz")).toPandas(),
sdf.select(SF.array_append(sdf.a, "xyz")).toPandas(),
)
self.assert_eq(
cdf.select(CF.array_append(cdf.a, CF.lit("ab"))).toPandas(),
sdf.select(SF.array_append(sdf.a, SF.lit("ab"))).toPandas(),
)
self.assert_eq(
cdf.select(CF.array_append(cdf.a, cdf.f)).toPandas(),
sdf.select(SF.array_append(sdf.a, sdf.f)).toPandas(),
)

@HyukjinKwon
Copy link
Member

Merged to master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants