code: def test_to_parquet_arrow_execution(setup):
      raw = pd.DataFrame(
          {
              "col1": np.random.rand(100),
              "col2": np.arange(100),
              "col3": np.random.choice(["a", "b", "c"], (100,)),
          }
      )
      df = DataFrame(raw, chunk_size=33)
  
      with tempfile.TemporaryDirectory() as base_path:
          # DATAFRAME TESTS
          path = os.path.join(base_path, "out-*.parquet")
          df.to_parquet(path).execute()
  
          read_df = md.read_parquet(path)
          result = read_df.execute().fetch()
          result = result.sort_index()
          pd.testing.assert_frame_equal(result, raw)
  
          read_df = md.read_parquet(path)
          result = read_df.execute().fetch()
          result = result.sort_index()
          pd.testing.assert_frame_equal(result, raw)
  
          # test read_parquet then to_parquet
          read_df = md.read_parquet(path)
          read_df.to_parquet(path).execute()
  
          # test partition_cols
          path = os.path.join(base_path, "out-partitioned")
          df.to_parquet(path, partition_cols=["col3"]).execute()
  
          read_df = md.read_parquet(path)
          result = read_df.execute().fetch()
          result["col3"] = result["col3"].astype("object")
          pd.testing.assert_frame_equal(
              result.sort_values("col1").reset_index(drop=True),
              raw.sort_values("col1").reset_index(drop=True),
          )
  
file_path: mars/mars/dataframe/datastore/tests/test_datastore_execution.py
imports: import os
  import tempfile
  import numpy
  import pandas
  import pytest
  from ....None import dataframe
  from ....tests.core import flaky
  from ...None import DataFrame
  from ...utils import patch_sa_engine_execute
label_desc: Use image node_id 3 for calling a global function with example usage: test_to_parquet_arrow_execution(setup) without return types