def METHOD_NAME(
    con, alltypes, mocker
):
    t = alltypes.select("int_col", "double_col", "string_col")
    pa_df = t.to_pyarrow().__dataframe__()
    to_pyarrow = mocker.spy(con, "to_pyarrow")
    df = t.__dataframe__()
    # An operation that requires loading data
    assert to_pyarrow.call_count == 0
    assert df.num_rows() == pa_df.num_rows()
    assert to_pyarrow.call_count == 1
    # Subselect columns doesn't reexecute
    df2 = df.select_columns([1, 0])
    pa_df2 = pa_df.select_columns([1, 0])
    assert df2.num_rows() == pa_df2.num_rows()
    assert df2.column_names() == pa_df2.column_names()
    assert to_pyarrow.call_count == 1