|
14 | 14 |
|
15 | 15 | import re |
16 | 16 |
|
17 | | -import pandas as pd |
18 | | -import pyarrow as pa |
19 | 17 | import pytest |
20 | 18 |
|
21 | 19 | from bigframes.core import array_value, expression |
@@ -300,35 +298,6 @@ def test_engines_astype_to_json(scalars_array_value: array_value.ArrayValue, eng |
300 | 298 | assert_equivalence_execution(arr.node, REFERENCE_ENGINE, engine) |
301 | 299 |
|
302 | 300 |
|
303 | | -@pytest.mark.parametrize("engine", ["polars", "bq"], indirect=True) |
304 | | -def test_engines_astype_struct_to_json( |
305 | | - nested_array_value: array_value.ArrayValue, engine |
306 | | -): |
307 | | - json_data = [ |
308 | | - {"version": 1, "project": "pandas"}, |
309 | | - {"version": 2, "project": "numpy"}, |
310 | | - ] |
311 | | - exprs = [ |
312 | | - # ops.AsTypeOp(to_type=bigframes.dtypes.JSON_DTYPE).as_expr( |
313 | | - # expression.deref("label") |
314 | | - # ), |
315 | | - # ops.AsTypeOp(to_type=bigframes.dtypes.JSON_DTYPE).as_expr( |
316 | | - # expression.deref("address") |
317 | | - # ), |
318 | | - ops.AsTypeOp(to_type=bigframes.dtypes.JSON_DTYPE).as_expr( |
319 | | - expression.const( |
320 | | - json_data, |
321 | | - pd.ArrowDtype( |
322 | | - pa.struct([("version", pa.int64()), ("project", pa.string())]) |
323 | | - ), |
324 | | - ) |
325 | | - ), |
326 | | - ] |
327 | | - arr, _ = nested_array_value.compute_values(exprs) |
328 | | - |
329 | | - assert_equivalence_execution(arr.node, REFERENCE_ENGINE, engine) |
330 | | - |
331 | | - |
332 | 301 | @pytest.mark.parametrize("engine", ["polars", "bq"], indirect=True) |
333 | 302 | def test_engines_astype_timedelta(scalars_array_value: array_value.ArrayValue, engine): |
334 | 303 | arr = apply_op( |
|
0 commit comments