MCPcopy Create free account
hub / github.com/dask/dask / test_optimization

Function test_optimization

dask/dataframe/dask_expr/tests/test_datasets.py:19–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17
18@pytest.mark.skipif(not pyarrow_strings_enabled(), reason="structure different")
19def test_optimization():
20 df = timeseries(dtypes={"x": int, "y": float}, seed=123)
21 expected = timeseries(dtypes={"x": int}, seed=123)
22 result = df[["x"]].optimize(fuse=False)
23 assert result.expr.frame.operand("columns") == expected.expr.frame.operand(
24 "columns"
25 )
26
27 expected = timeseries(dtypes={"x": int}, seed=123)["x"].simplify()
28 result = df["x"].optimize(fuse=False)
29 assert expected.expr.frame.operand("columns") == result.expr.frame.operand(
30 "columns"
31 )
32
33
34def test_arrow_string_option():

Callers

nothing calls this directly

Calls 4

timeseriesFunction · 0.90
operandMethod · 0.80
optimizeMethod · 0.45
simplifyMethod · 0.45

Tested by

no test coverage detected