@@ -36,11 +36,7 @@ def test_json_set_at_json_path(json_path, expected_json):
36
36
actual = bbq .json_set (s , json_path_value_pairs = [(json_path , 10 )])
37
37
expected = bpd .Series (expected_json , dtype = dtypes .JSON_DTYPE )
38
38
39
- # TODO(b/401630655): JSON is not compatible with allow_large_results=False
40
- pd .testing .assert_series_equal (
41
- actual .to_pandas (allow_large_results = True ),
42
- expected .to_pandas (allow_large_results = True ),
43
- )
39
+ pd .testing .assert_series_equal (actual .to_pandas (), expected .to_pandas ())
44
40
45
41
46
42
@pytest .mark .parametrize (
@@ -60,11 +56,7 @@ def test_json_set_at_json_value_type(json_value, expected_json):
60
56
actual = bbq .json_set (s , json_path_value_pairs = [("$.a.b" , json_value )])
61
57
expected = bpd .Series (expected_json , dtype = dtypes .JSON_DTYPE )
62
58
63
- # TODO(b/401630655): JSON is not compatible with allow_large_results=False
64
- pd .testing .assert_series_equal (
65
- actual .to_pandas (allow_large_results = True ),
66
- expected .to_pandas (allow_large_results = True ),
67
- )
59
+ pd .testing .assert_series_equal (actual .to_pandas (), expected .to_pandas ())
68
60
69
61
70
62
def test_json_set_w_more_pairs ():
@@ -77,11 +69,7 @@ def test_json_set_w_more_pairs():
77
69
expected_json = ['{"a": 3, "b": 2}' , '{"a": 4, "b": 2}' , '{"a": 5, "b": 2, "c": 1}' ]
78
70
expected = bpd .Series (expected_json , dtype = dtypes .JSON_DTYPE )
79
71
80
- # TODO(b/401630655): JSON is not compatible with allow_large_results=False
81
- pd .testing .assert_series_equal (
82
- actual .to_pandas (allow_large_results = True ),
83
- expected .to_pandas (allow_large_results = True ),
84
- )
72
+ pd .testing .assert_series_equal (actual .to_pandas (), expected .to_pandas ())
85
73
86
74
87
75
def test_json_set_w_invalid_value_type ():
@@ -114,11 +102,7 @@ def test_json_extract_from_json():
114
102
actual = bbq .json_extract (s , "$.a.b" )
115
103
expected = bpd .Series (["[1, 2]" , None , "0" ], dtype = dtypes .JSON_DTYPE )
116
104
117
- # TODO(b/401630655): JSON is not compatible with allow_large_results=False
118
- pd .testing .assert_series_equal (
119
- actual .to_pandas (allow_large_results = True ),
120
- expected .to_pandas (allow_large_results = True ),
121
- )
105
+ pd .testing .assert_series_equal (actual .to_pandas (), expected .to_pandas ())
122
106
123
107
124
108
def test_json_extract_from_string ():
@@ -129,11 +113,7 @@ def test_json_extract_from_string():
129
113
actual = bbq .json_extract (s , "$.a.b" )
130
114
expected = bpd .Series (["[1,2]" , None , "0" ], dtype = pd .StringDtype (storage = "pyarrow" ))
131
115
132
- # TODO(b/401630655): JSON is not compatible with allow_large_results=False
133
- pd .testing .assert_series_equal (
134
- actual .to_pandas (allow_large_results = True ),
135
- expected .to_pandas (allow_large_results = True ),
136
- )
116
+ pd .testing .assert_series_equal (actual .to_pandas (), expected .to_pandas ())
137
117
138
118
139
119
def test_json_extract_w_invalid_series_type ():
@@ -165,11 +145,7 @@ def test_json_extract_array_from_json():
165
145
expected .index .name = None
166
146
expected .name = None
167
147
168
- # TODO(b/401630655): JSON is not compatible with allow_large_results=False
169
- pd .testing .assert_series_equal (
170
- actual .to_pandas (allow_large_results = True ),
171
- expected .to_pandas (allow_large_results = True ),
172
- )
148
+ pd .testing .assert_series_equal (actual .to_pandas (), expected .to_pandas ())
173
149
174
150
175
151
def test_json_extract_array_from_json_strings ():
@@ -183,11 +159,7 @@ def test_json_extract_array_from_json_strings():
183
159
dtype = pd .ArrowDtype (pa .list_ (pa .string ())),
184
160
)
185
161
186
- # TODO(b/401630655): JSON is not compatible with allow_large_results=False
187
- pd .testing .assert_series_equal (
188
- actual .to_pandas (allow_large_results = True ),
189
- expected .to_pandas (allow_large_results = True ),
190
- )
162
+ pd .testing .assert_series_equal (actual .to_pandas (), expected .to_pandas ())
191
163
192
164
193
165
def test_json_extract_array_from_json_array_strings ():
@@ -201,11 +173,7 @@ def test_json_extract_array_from_json_array_strings():
201
173
dtype = pd .ArrowDtype (pa .list_ (pa .string ())),
202
174
)
203
175
204
- # TODO(b/401630655): JSON is not compatible with allow_large_results=False
205
- pd .testing .assert_series_equal (
206
- actual .to_pandas (allow_large_results = True ),
207
- expected .to_pandas (allow_large_results = True ),
208
- )
176
+ pd .testing .assert_series_equal (actual .to_pandas (), expected .to_pandas ())
209
177
210
178
211
179
def test_json_extract_array_w_invalid_series_type ():
@@ -219,35 +187,23 @@ def test_json_extract_string_array_from_json_strings():
219
187
actual = bbq .json_extract_string_array (s , "$.a" )
220
188
expected = bpd .Series ([["ab" , "2" , "3 xy" ], [], ["4" , "5" ]])
221
189
222
- # TODO(b/401630655): JSON is not compatible with allow_large_results=False
223
- pd .testing .assert_series_equal (
224
- actual .to_pandas (allow_large_results = True ),
225
- expected .to_pandas (allow_large_results = True ),
226
- )
190
+ pd .testing .assert_series_equal (actual .to_pandas (), expected .to_pandas ())
227
191
228
192
229
193
def test_json_extract_string_array_from_array_strings ():
230
194
s = bpd .Series (["[1, 2, 3]" , "[]" , "[4,5]" ])
231
195
actual = bbq .json_extract_string_array (s )
232
196
expected = bpd .Series ([["1" , "2" , "3" ], [], ["4" , "5" ]])
233
197
234
- # TODO(b/401630655): JSON is not compatible with allow_large_results=False
235
- pd .testing .assert_series_equal (
236
- actual .to_pandas (allow_large_results = True ),
237
- expected .to_pandas (allow_large_results = True ),
238
- )
198
+ pd .testing .assert_series_equal (actual .to_pandas (), expected .to_pandas ())
239
199
240
200
241
201
def test_json_extract_string_array_as_float_array_from_array_strings ():
242
202
s = bpd .Series (["[1, 2.5, 3]" , "[]" , "[4,5]" ])
243
203
actual = bbq .json_extract_string_array (s , value_dtype = dtypes .FLOAT_DTYPE )
244
204
expected = bpd .Series ([[1 , 2.5 , 3 ], [], [4 , 5 ]])
245
205
246
- # TODO(b/401630655): JSON is not compatible with allow_large_results=False
247
- pd .testing .assert_series_equal (
248
- actual .to_pandas (allow_large_results = True ),
249
- expected .to_pandas (allow_large_results = True ),
250
- )
206
+ pd .testing .assert_series_equal (actual .to_pandas (), expected .to_pandas ())
251
207
252
208
253
209
def test_json_extract_string_array_w_invalid_series_type ():
0 commit comments