)]}'
{
  "commit": "5684b974c2bcefbd000a2671fc7b2856f9579240",
  "tree": "99bf098df5fc53e89dda215e6fc0be3713966dca",
  "parents": [
    "f066153277d96aa4346a4749781da8a357d87b8e"
  ],
  "author": {
    "name": "yujun",
    "email": "yujun@selectdb.com",
    "time": "Mon Nov 09 15:25:21 2026 +0800"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Nov 09 15:25:21 2026 +0800"
  },
  "message": "[fix](fe) Reject static partition assignments for OLAP tables (#70287)\n\nDoris accepts both partition-name lists and static partition assignments\nin INSERT statements. Static assignments such as\n`PARTITION(dt\u003d\u00272026-11-04\u0027)` are supported by external-table write\npaths; OLAP tables use partition names, or `PARTITION(*)` for automatic\noverwrite partition detection.\n\n### What problem does this PR solve?\n\nIssue Number: None\nRelated PR: #58396 (introduced static partition overwrite syntax)\nPR Type: Bugfix\n\nProblem Summary:\n\nAn INSERT OVERWRITE on an OLAP table accepts\n`PARTITION(dt\u003d\u00272026-11-04\u0027)` but silently discards the static partition\nassignments when creating the table sink. The resulting empty\npartition-name list is treated as a whole-table overwrite, so data in\nunrelated partitions is removed. Reject static partition assignments\nbefore constructing an OLAP sink, for both INSERT INTO and INSERT\nOVERWRITE, including remote Doris targets. The error directs users to\npartition names or automatic overwrite partition detection.\n\n### Details\n\n- **Frequency:** Reproducible whenever an OLAP INSERT OVERWRITE\nspecifies static partition assignments; ordinary INSERT INTO silently\nignores the same assignments.\n- **Root cause:** The parser preserves assignments separately from\npartition names, but both OLAP sink creation entry points ignore the\nassignments.\n- **Why existing tests missed it:** Parser tests verify that assignments\nare accepted, and external-table tests exercise supported static\npartition writes. They do not check that OLAP targets reject the\nunsupported syntax or preserve unrelated partitions.\n- **Fix:** Share an admission check between both OLAP sink creation\nentry points and raise an analysis error before any write or partition\nreplacement.\n- **Other paths and branches:** External connector sinks retain their\nstatic partition assignments. Partition-name inserts, partition-name\noverwrites, automatic partition detection, and explicit whole-table\noverwrites retain their behavior.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a83a46044d1812d0bf75f6fad248ac809bb77234",
      "old_mode": 33188,
      "old_path": "fe/fe-core/src/main/java/org/apache/doris/nereids/analyzer/UnboundTableSinkCreator.java",
      "new_id": "9cdcac6cad7289f555aca7b1fc41674a9f4a5154",
      "new_mode": 33188,
      "new_path": "fe/fe-core/src/main/java/org/apache/doris/nereids/analyzer/UnboundTableSinkCreator.java"
    },
    {
      "type": "modify",
      "old_id": "c489dbefb0dd096fb3a0d3a457bf4f3b97afb57d",
      "old_mode": 33188,
      "old_path": "fe/fe-core/src/test/java/org/apache/doris/nereids/analyzer/UnboundTableSinkCreatorTest.java",
      "new_id": "e37d3b27145f28ab779449323f5eaf0855410619",
      "new_mode": 33188,
      "new_path": "fe/fe-core/src/test/java/org/apache/doris/nereids/analyzer/UnboundTableSinkCreatorTest.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "0cf60dd5d4c437f9a88ca4e2b177750a619121bb",
      "new_mode": 33188,
      "new_path": "regression-test/data/insert_overwrite_p0/test_olap_static_partition_rejected.out"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "ca2a04fcded4074e17fc46216cbeff4d227f05a6",
      "new_mode": 33188,
      "new_path": "regression-test/suites/insert_overwrite_p0/test_olap_static_partition_rejected.groovy"
    }
  ]
}
