code: def test_arithmetic_query(setup):
      raw = pd.DataFrame(
          np.random.rand(100, 10), columns=list("ABCDEFGHIJ")
      )
      raw2 = pd.DataFrame(np.random.rand(100, 5), columns=list("ABCDE"))
  
      # does not support heterogeneous sources
      df1 = md.DataFrame(raw, chunk_size=10)
      df2 = md.DataFrame(raw2, chunk_size=10)
      df3 = -(df1["A"] + df2["B"])
      graph = TileableGraph([df3.data])
      next(TileableGraphBuilder(graph).build())
      records = optimize(graph)
      assert records.get_optimization_result(df3.data) is None
  
      # does not support customized args in arithmetic
      df1 = md.DataFrame(raw, chunk_size=10)
      df3 = (-df1["A"]).add(df1["B"], fill_value=0.0)
      graph = TileableGraph([df3.data])
      next(TileableGraphBuilder(graph).build())
      records = optimize(graph)
      assert records.get_optimization_result(df3.data) is None
  
      # does not support GPU
      df1 = md.DataFrame(raw, chunk_size=10, gpu=True)
      df4 = (-df1["A"]).add(df1["B"])
      graph = TileableGraph([df4.data])
      next(TileableGraphBuilder(graph).build())
      records = optimize(graph)
      assert records.get_optimization_result(df4.data) is None
  
      # does not support non-string headers
      df1 = md.DataFrame(np.random.rand(100, 5))
      df2 = df1[0] + df1[1]
      graph = TileableGraph([df2.data])
      next(TileableGraphBuilder(graph).build())
      records = optimize(graph)
      assert records.get_optimization_result(df2.data) is None
  
      df1 = md.DataFrame(raw, chunk_size=10)
      df2 = -df1["A"] + df1["B"] * 5
      graph = TileableGraph([df2.data])
      next(TileableGraphBuilder(graph).build())
      records = optimize(graph)
      opt_df2 = records.get_optimization_result(df2.data)
      assert opt_df2.op.expr == "(-(`A`)) + ((`B`) * (5))"
  
      pd.testing.assert_series_equal(
          df2.execute().fetch(), -raw["A"] + raw["B"] * 5
      )
  
      df1 = md.DataFrame(raw, chunk_size=10)
      df2 = -df1["A"] + df1["B"] * 5 + 3 * df1["C"]
      graph = TileableGraph([df1["A"].data, df2.data])
      next(TileableGraphBuilder(graph).build())
      records = optimize(graph)
      opt_df2 = records.get_optimization_result(df2.data)
      assert (
          opt_df2.op.expr
          == "((-(`A`)) + ((`B`) * (5))) + ((3) * (`C`))"
      )
  
      r_df2, _r_col_a = fetch(execute(df2, df1["A"]))
      pd.testing.assert_series_equal(
          r_df2, -raw["A"] + raw["B"] * 5 + 3 * raw["C"]
      )
  
file_path: mars/mars/optimization/logical/tileable/tests/test_arithmetic_query.py
imports: import re
  import numpy
  import pandas
  from .....None import dataframe
  from .....None import execute, fetch
  from .....core import enter_mode, TileableGraph, TileableGraphBuilder
  from .....dataframe.base.eval import DataFrameEval
  from ..None import optimize
label_desc: Use image node_id 2 for calling a global function with example usage: test_arithmetic_query(setup) without return types