{"record":{"id":"402a7b6195af72d1","repo":"apache/iceberg","slug":"unknown-planning-mode","errorCode":null,"errorMessage":"Unknown planning mode: ","messagePattern":"Unknown planning mode: ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/apache/iceberg/PlanningMode.java","lineNumber":47,"sourceCode":"\n  PlanningMode(String modeName) {\n    this.modeName = modeName;\n  }\n\n  public static PlanningMode fromName(String modeName) {\n    Preconditions.checkArgument(modeName != null, \"Mode name is null\");\n\n    if (AUTO.modeName().equalsIgnoreCase(modeName)) {\n      return AUTO;\n\n    } else if (LOCAL.modeName().equalsIgnoreCase(modeName)) {\n      return LOCAL;\n\n    } else if (DISTRIBUTED.modeName().equalsIgnoreCase(modeName)) {\n      return DISTRIBUTED;\n\n    } else {\n      throw new IllegalArgumentException(\"Unknown planning mode: \" + modeName);\n    }\n  }\n\n  public String modeName() {\n    return modeName;\n  }\n}\n","sourceCodeStart":29,"sourceCodeEnd":55,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/core/src/main/java/org/apache/iceberg/PlanningMode.java#L29-L55","documentation":"PlanningMode.fromName converts a string (from the scan planning table property, e.g. 'local'/'distributed') into a PlanningMode enum constant and throws IllegalArgumentException for any other value. Only the exact (case-insensitive) mode names are accepted.","triggerScenarios":"Setting the table property 'scan.planning-mode' (or the equivalent config) to a misspelled or unsupported value such as 'distributedd', 'auto', or an empty string.","commonSituations":"Typos in TBLPROPERTIES / Flink table options when choosing local vs distributed planning; copying config from docs of a version that supports additional modes.","solutions":["Set the property to exactly 'local' or 'distributed' (case-insensitive).","Remove the property entirely to fall back to the default planning behavior.","Check for stray whitespace or copied characters in the property value."],"exampleFix":"// before\nALTER TABLE t SET TBLPROPERTIES ('scan.planning-mode'='distributedd');\n// after\nALTER TABLE t SET TBLPROPERTIES ('scan.planning-mode'='distributed');","handlingStrategy":"validation","validationCode":"String mode = props.get(\"scan.planning-mode\");\nif (mode != null && !mode.equalsIgnoreCase(\"local\") && !mode.equalsIgnoreCase(\"distributed\")) {\n  throw new IllegalArgumentException(\"Unknown planning mode: \" + mode);\n}","typeGuard":null,"tryCatchPattern":"try {\n  PlanningMode.fromName(mode);\n} catch (IllegalArgumentException e) {\n  PlanningMode planningMode = null; // fall back to library default\n}","preventionTips":["Only set 'scan.planning-mode' to 'local' or 'distributed'.","Trim and validate the property value before setting it via SQL or config files.","Omit the property to use the version's default planning behavior."],"tags":["invalid-config-value","planning-mode","table-properties","java"],"backgroundTag":"invalid-config-value","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}