{"record":{"id":"f7e4be6095d0d7be","repo":"apache/iceberg","slug":"table-property-s-must-have-integer-value","errorCode":null,"errorMessage":"Table property %s must have integer value","messagePattern":"Table property (.+?) must have integer value","errorType":"validation","errorClass":"ValidationException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/apache/iceberg/util/PropertyUtil.java","lineNumber":142,"sourceCode":"    if (value != null) {\n      return value;\n    }\n    return defaultValue;\n  }\n\n  /**\n   * Validate the table commit related properties to have non-negative integer on table creation to\n   * prevent commit failure\n   */\n  public static void validateCommitProperties(Map<String, String> properties) {\n    for (String commitProperty : COMMIT_PROPERTIES) {\n      String value = properties.get(commitProperty);\n      if (value != null) {\n        int parsedValue;\n        try {\n          parsedValue = Integer.parseInt(value);\n        } catch (NumberFormatException e) {\n          throw new ValidationException(\n              \"Table property %s must have integer value\", commitProperty);\n        }\n        ValidationException.check(\n            parsedValue >= 0,\n            \"Table property %s must have non negative integer value\",\n            commitProperty);\n      }\n    }\n  }\n\n  /**\n   * Returns subset of provided map with keys matching the provided prefix. Matching is\n   * case-sensitive and the matching prefix is removed from the keys in returned map.\n   *\n   * @param properties input map\n   * @param prefix prefix to choose keys from input map\n   * @return subset of input map with keys starting with provided prefix and prefix trimmed out\n   */","sourceCodeStart":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/core/src/main/java/org/apache/iceberg/util/PropertyUtil.java#L124-L160","documentation":"PropertyUtil.validateCommitProperties checks that each expected commit-related table property, when present, parses as an integer and is non-negative. A non-numeric value throws ValidationException naming the offending property key.","triggerScenarios":"Setting a table property like commit.retry.num-retries or similar numeric property to a non-integer string (e.g. \"three\", \"1.5\", \"\") before a commit.","commonSituations":"Hand-edited table properties, Terraform/SQL SET TBLPROPERTIES with wrong type, copy-paste from docs with wrong unit.","solutions":["Correct the property value to a non-negative integer string (e.g. '4')","Remove the property to fall back to the default","Check the property name — some properties accept long/double, not int"],"exampleFix":"// before\ntable.updateProperties().set(\"commit.retry.num-retries\", \"three\").commit();\n// after\ntable.updateProperties().set(\"commit.retry.num-retries\", \"4\").commit();","handlingStrategy":"validation","validationCode":"String v = properties.get(\"commit.retry.num-retries\");\nif (v != null) {\n  try { Integer.parseInt(v); } catch (NumberFormatException e) { throw new IllegalArgumentException(\"property must be integer, got: \" + v); }\n}","typeGuard":null,"tryCatchPattern":"try { table.refresh(); } catch (ValidationException e) { /* fix property value then retry commit */ }","preventionTips":["Validate numeric table properties at write time","Use typed property helpers (PropertyUtil.propertyAsInt)","Quote-free, unit-free integer strings only"],"tags":["properties","validation","config"],"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-14T16:17:12.679Z"}