)]}'
{
  "commit": "863694202aef47863bbdef35816d3c0e8f3066b9",
  "tree": "2c290b6f6c64a8c6131bda676e0e297948179f5d",
  "parents": [
    "35309c5336dbf08781212623d2ce05e7a1ba86f9"
  ],
  "author": {
    "name": "Spenser Sun",
    "email": "haotian.sun@databricks.com",
    "time": "Tue Jul 28 14:00:00 2026 +0800"
  },
  "committer": {
    "name": "Ruifeng Zheng",
    "email": "ruifengz@apache.org",
    "time": "Tue Jul 28 14:00:00 2026 +0800"
  },
  "message": "[SPARK-58332][PYTHON][TEST] Move compare_or_generate_golden_matrix into GoldenFileTestMixin\n\n### What changes were proposed in this pull request?\n\n`compare_or_generate_golden_matrix` was duplicated verbatim across three PyArrow golden-file test files:\n\n- `python/pyspark/tests/upstream/pyarrow/test_pyarrow_array_cast.py`\n- `python/pyspark/tests/upstream/pyarrow/test_pyarrow_arrow_to_pandas_default.py`\n- `python/pyspark/tests/upstream/pyarrow/test_pyarrow_arrow_to_pandas_non_default.py`\n\nThis PR moves it into `GoldenFileTestMixin` (`python/pyspark/testing/goldenutils.py`), which all three suites already inherit, and removes the local copies. Imports that became unused after the removal (`inspect`, `os`, `typing.Callable/List/Optional`) are dropped from the test files.\n\nThis is a follow-up to #57435, where reviewers asked to centralize the duplicated matrix driver into the mixin.\n\n### Why are the changes needed?\n\nRemoves duplicated test machinery so the golden-file matrix driver has a single implementation, making it easier to maintain and reuse for future golden-file suites.\n\n### Does this PR introduce _any_ user-facing change?\n\nNo. Test-only, behavior-preserving refactor.\n\n### How was this patch tested?\n\nExisting suites pass in compare mode (no golden files regenerated):\n\n```\npython -m pytest \\\n  python/pyspark/tests/upstream/pyarrow/test_pyarrow_array_cast.py \\\n  python/pyspark/tests/upstream/pyarrow/test_pyarrow_arrow_to_pandas_default.py \\\n  python/pyspark/tests/upstream/pyarrow/test_pyarrow_arrow_to_pandas_non_default.py\n```\n\n### Was this patch authored or co-authored using generative AI tooling?\n\nGenerated-by: Claude Code (Opus 4.8)\n\nCloses #57510 from Spenserrrr/centralize-golden-matrix-helper.\n\nAuthored-by: Spenser Sun \u003chaotian.sun@databricks.com\u003e\nSigned-off-by: Ruifeng Zheng \u003cruifengz@apache.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "b1e4af599cd165442609701cf4257163b924c215",
      "old_mode": 33188,
      "old_path": "python/pyspark/testing/goldenutils.py",
      "new_id": "d0a191e9fe9ad504bd1399227bce5c3c16a05c83",
      "new_mode": 33188,
      "new_path": "python/pyspark/testing/goldenutils.py"
    },
    {
      "type": "modify",
      "old_id": "6c48e4e9461a9dcf331877d24f7f3f0db29cb408",
      "old_mode": 33188,
      "old_path": "python/pyspark/tests/upstream/pyarrow/test_pyarrow_array_cast.py",
      "new_id": "128557fa6548b4e9634776015cdc8654e127e1bd",
      "new_mode": 33188,
      "new_path": "python/pyspark/tests/upstream/pyarrow/test_pyarrow_array_cast.py"
    },
    {
      "type": "modify",
      "old_id": "566d10a6e35da0d9477c7a1c93515a5bb1b0fe8e",
      "old_mode": 33188,
      "old_path": "python/pyspark/tests/upstream/pyarrow/test_pyarrow_arrow_to_pandas_default.py",
      "new_id": "e3a9a0c0f5bdf06fb53640608642c0e893a203e2",
      "new_mode": 33188,
      "new_path": "python/pyspark/tests/upstream/pyarrow/test_pyarrow_arrow_to_pandas_default.py"
    },
    {
      "type": "modify",
      "old_id": "6587f5deb4da05a3145cece36fbfbbe6a8a2b51b",
      "old_mode": 33188,
      "old_path": "python/pyspark/tests/upstream/pyarrow/test_pyarrow_arrow_to_pandas_non_default.py",
      "new_id": "ddfc8f759e26fa53d64ad26ac096ba3730aecb06",
      "new_mode": 33188,
      "new_path": "python/pyspark/tests/upstream/pyarrow/test_pyarrow_arrow_to_pandas_non_default.py"
    }
  ]
}
