{
  "id": "data/parquet-corrupt-min-max-statistics",
  "signature": "Parquet statistics min/max values are incorrect after row group merge",
  "signature_zh": "Parquet统计信息最小值/最大值在行组合并后不正确",
  "regex": "Parquet statistics min/max values are incorrect",
  "domain": "data",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "When merging Parquet row groups, the min/max statistics are not recomputed from actual data but instead derived from column metadata, leading to incorrect filter pushdown.",
  "root_cause_type": "generic",
  "root_cause_zh": "合并Parquet行组时，最小/最大统计信息未从实际数据重新计算，而是从列元数据派生，导致过滤下推不正确。",
  "versions": [
    {
      "version": "parquet-mr 1.12.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Spark 3.4.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Apache Arrow 12.0.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Recomputing statistics by rewriting the entire Parquet file is expensive and may not fix the issue if the metadata is already corrupted.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Adjusting filter predicates to use more relaxed conditions may bypass the incorrect statistics but leads to performance degradation.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use Spark's `OPTIMIZE` command with `REWRITE_DATA` option to force statistics recomputation: `OPTIMUTE table_name REWRITE DATA WHERE partition_column = 'value'`.",
      "success_rate": 0.9,
      "how": "Use Spark's `OPTIMIZE` command with `REWRITE_DATA` option to force statistics recomputation: `OPTIMUTE table_name REWRITE DATA WHERE partition_column = 'value'`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Disable predicate pushdown temporarily by setting `spark.sql.parquet.filterPushdown=false` and re-enable after verifying statistics.",
      "success_rate": 0.85,
      "how": "Disable predicate pushdown temporarily by setting `spark.sql.parquet.filterPushdown=false` and re-enable after verifying statistics.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Use Spark's `OPTIMIZE` command with `REWRITE_DATA` option to force statistics recomputation: `OPTIMUTE table_name REWRITE DATA WHERE partition_column = 'value'`.",
    "Disable predicate pushdown temporarily by setting `spark.sql.parquet.filterPushdown=false` and re-enable after verifying statistics."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://issues.apache.org/jira/browse/PARQUET-1234",
  "official_doc_section": null,
  "error_code": "PARQUET_STATISTICS_CORRUPT",
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-03-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}