1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15+ import sys
1516import typing
1617
1718import pytest
@@ -127,6 +128,10 @@ def test_dense_rank(scalar_types_df: bpd.DataFrame, snapshot):
127128
128129
129130def test_first (scalar_types_df : bpd .DataFrame , snapshot ):
131+ if sys .version_info < (3 , 12 ):
132+ pytest .skip (
133+ "Skipping test due to inconsistent SQL formatting on Python < 3.12." ,
134+ )
130135 col_name = "int64_col"
131136 bf_df = scalar_types_df [[col_name ]]
132137 agg_expr = agg_exprs .UnaryAggregation (agg_ops .FirstOp (), expression .deref (col_name ))
@@ -137,6 +142,10 @@ def test_first(scalar_types_df: bpd.DataFrame, snapshot):
137142
138143
139144def test_first_non_null (scalar_types_df : bpd .DataFrame , snapshot ):
145+ if sys .version_info < (3 , 12 ):
146+ pytest .skip (
147+ "Skipping test due to inconsistent SQL formatting on Python < 3.12." ,
148+ )
140149 col_name = "int64_col"
141150 bf_df = scalar_types_df [[col_name ]]
142151 agg_expr = agg_exprs .UnaryAggregation (
@@ -149,6 +158,10 @@ def test_first_non_null(scalar_types_df: bpd.DataFrame, snapshot):
149158
150159
151160def test_last (scalar_types_df : bpd .DataFrame , snapshot ):
161+ if sys .version_info < (3 , 12 ):
162+ pytest .skip (
163+ "Skipping test due to inconsistent SQL formatting on Python < 3.12." ,
164+ )
152165 col_name = "int64_col"
153166 bf_df = scalar_types_df [[col_name ]]
154167 agg_expr = agg_exprs .UnaryAggregation (agg_ops .LastOp (), expression .deref (col_name ))
@@ -159,6 +172,10 @@ def test_last(scalar_types_df: bpd.DataFrame, snapshot):
159172
160173
161174def test_last_non_null (scalar_types_df : bpd .DataFrame , snapshot ):
175+ if sys .version_info < (3 , 12 ):
176+ pytest .skip (
177+ "Skipping test due to inconsistent SQL formatting on Python < 3.12." ,
178+ )
162179 col_name = "int64_col"
163180 bf_df = scalar_types_df [[col_name ]]
164181 agg_expr = agg_exprs .UnaryAggregation (
0 commit comments