Skip to content

Commit

Permalink
feat: implement concat function (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
EpsilonPrime authored Jun 19, 2024
1 parent 51d8f01 commit c88854e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/gateway/tests/test_dataframe_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
broadcast,
coalesce,
col,
concat,
expr,
greatest,
isnan,
Expand Down Expand Up @@ -1026,3 +1027,16 @@ def test_named_struct(self, spark_session):
outcome = df.select(named_struct(lit('a'), col('s'), lit('b'), col('i'))).collect()

assertDataFrameEqual(outcome, expected)

def test_concat(self, users_dataframe):
expected = [
Row(a='user669344115Joshua Browntrue'),
Row(a='user849118289Brooke Jonesfalse'),
Row(a='user954079192Collin Frankfalse'),
]

with utilizes_valid_plans(users_dataframe):
outcome = users_dataframe.select(
concat('user_id', 'name', 'paid_for_service')).limit(3).collect()

assertDataFrameEqual(outcome, expected)

0 comments on commit c88854e

Please sign in to comment.