11
11
from pandera .api .extensions import register_builtin_check
12
12
from pandera .api .ibis .types import IbisData
13
13
from pandera .backends .ibis .utils import select_column
14
- from pandera .constants import check_col_name
15
-
16
14
17
15
T = TypeVar ("T" )
18
16
@@ -46,9 +44,7 @@ def equal_to(data: IbisData, value: Any) -> ir.Table:
46
44
equal to this value.
47
45
"""
48
46
value = _infer_interval_with_mixed_units (value )
49
- return data .table .mutate (
50
- s .across (_selector (data .key ), _ == value , names = check_col_name )
51
- )
47
+ return data .table .select (s .across (_selector (data .key ), _ == value ))
52
48
53
49
54
50
@register_builtin_check (
@@ -63,9 +59,7 @@ def not_equal_to(data: IbisData, value: Any) -> ir.Table:
63
59
:param value: This value must not occur in the checked data structure.
64
60
"""
65
61
value = _infer_interval_with_mixed_units (value )
66
- return data .table .mutate (
67
- s .across (_selector (data .key ), _ != value , names = check_col_name )
68
- )
62
+ return data .table .select (s .across (_selector (data .key ), _ != value ))
69
63
70
64
71
65
@register_builtin_check (
@@ -82,9 +76,7 @@ def greater_than(data: IbisData, min_value: Any) -> ir.Table:
82
76
to the dtype of the :class:`ir.Column` to be validated.
83
77
"""
84
78
value = _infer_interval_with_mixed_units (min_value )
85
- return data .table .mutate (
86
- s .across (_selector (data .key ), _ > value , names = check_col_name )
87
- )
79
+ return data .table .select (s .across (_selector (data .key ), _ > value ))
88
80
89
81
90
82
@register_builtin_check (
@@ -100,9 +92,7 @@ def greater_than_or_equal_to(data: IbisData, min_value: Any) -> ir.Table:
100
92
to the dtype of the :class:`ir.Column` to be validated.
101
93
"""
102
94
value = _infer_interval_with_mixed_units (min_value )
103
- return data .table .mutate (
104
- s .across (_selector (data .key ), _ >= value , names = check_col_name )
105
- )
95
+ return data .table .select (s .across (_selector (data .key ), _ >= value ))
106
96
107
97
108
98
@register_builtin_check (
@@ -119,9 +109,7 @@ def less_than(data: IbisData, max_value: Any) -> ir.Table:
119
109
:class:`ir.Column` to be validated.
120
110
"""
121
111
value = _infer_interval_with_mixed_units (max_value )
122
- return data .table .mutate (
123
- s .across (_selector (data .key ), _ < value , names = check_col_name )
124
- )
112
+ return data .table .select (s .across (_selector (data .key ), _ < value ))
125
113
126
114
127
115
@register_builtin_check (
@@ -137,6 +125,4 @@ def less_than_or_equal_to(data: IbisData, max_value: Any) -> ir.Table:
137
125
:class:`ir.Column` to be validated.
138
126
"""
139
127
value = _infer_interval_with_mixed_units (max_value )
140
- return data .table .mutate (
141
- s .across (_selector (data .key ), _ <= value , names = check_col_name )
142
- )
128
+ return data .table .select (s .across (_selector (data .key ), _ <= value ))
0 commit comments