Skip to content

Commit 3b83a96

Browse files
committed
fix: update test_arrow_cast to use column 'b'
1 parent ba53bd1 commit 3b83a96

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

python/tests/test_functions.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -909,14 +909,15 @@ def test_temporal_functions(df):
909909

910910
def test_arrow_cast(df):
911911
df = df.select(
912-
f.arrow_cast(column("a"), utf8_literal("Float64")).alias("a_as_float"),
913-
f.arrow_cast(column("a"), utf8_literal("Int32")).alias("a_as_int"),
912+
f.arrow_cast(column("b"), utf8_literal("Float64")).alias("b_as_float"),
913+
f.arrow_cast(column("b"), utf8_literal("Int32")).alias("b_as_int"),
914914
)
915915
result = df.collect()
916916
assert len(result) == 1
917917
result = result[0]
918-
assert result.column(0) == pa.array([1.0, 2.0, 3.0], type=pa.float64())
919-
assert result.column(1) == pa.array([1, 2, 3], type=pa.int32())
918+
919+
assert result.column(0) == pa.array([4.0, 5.0, 6.0], type=pa.float64())
920+
assert result.column(1) == pa.array([4, 5, 6], type=pa.int32())
920921

921922

922923
def test_case(df):

0 commit comments

Comments
 (0)