Skip to content

Commit 380a2ac

Browse files
committed
Update tests to look for string_view type
1 parent 9661ccf commit 380a2ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/tpch/_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
def df_selection(col_name, col_type):
2626
if col_type == pa.float64() or isinstance(col_type, pa.Decimal128Type):
2727
return F.round(col(col_name), lit(2)).alias(col_name)
28-
elif col_type == pa.string():
28+
elif col_type == pa.string() or col_type == pa.string_view():
2929
return F.trim(col(col_name)).alias(col_name)
3030
else:
3131
return col(col_name)
@@ -43,7 +43,7 @@ def load_schema(col_name, col_type):
4343
def expected_selection(col_name, col_type):
4444
if col_type == pa.int64() or col_type == pa.int32():
4545
return F.trim(col(col_name)).cast(col_type).alias(col_name)
46-
elif col_type == pa.string():
46+
elif col_type == pa.string() or col_type == pa.string_view():
4747
return F.trim(col(col_name)).alias(col_name)
4848
else:
4949
return col(col_name)

0 commit comments

Comments
 (0)