@@ -103,30 +103,28 @@ def partitioned_df():
103103
104104
105105def test_select (df ):
106- df = df .select (
106+ df_1 = df .select (
107107 column ("a" ) + column ("b" ),
108108 column ("a" ) - column ("b" ),
109109 )
110110
111111 # execute and collect the first (and only) batch
112- result = df .collect ()[0 ]
112+ result = df_1 .collect ()[0 ]
113113
114114 assert result .column (0 ) == pa .array ([5 , 7 , 9 ])
115115 assert result .column (1 ) == pa .array ([- 3 , - 3 , - 3 ])
116116
117-
118- def test_select_mixed_expr_string (df ):
119- df = df .select_columns (column ("b" ), "a" )
117+ df_2 = df .select ("b" , "a" )
120118
121119 # execute and collect the first (and only) batch
122- result = df .collect ()[0 ]
120+ result = df_2 .collect ()[0 ]
123121
124122 assert result .column (0 ) == pa .array ([4 , 5 , 6 ])
125123 assert result .column (1 ) == pa .array ([1 , 2 , 3 ])
126124
127125
128- def test_select_columns (df ):
129- df = df .select_columns ( "b" , "a" )
126+ def test_select_mixed_expr_string (df ):
127+ df = df .select ( column ( "b" ) , "a" )
130128
131129 # execute and collect the first (and only) batch
132130 result = df .collect ()[0 ]
0 commit comments