{"record":{"id":"d4ab8ec45b84ea6a","repo":"apache/iceberg","slug":"unsupported-parquet-page-version-s-must-be-v1-o","errorCode":null,"errorMessage":"Unsupported Parquet page version: %s (must be v1 or v2)","messagePattern":"Unsupported Parquet page version: (.+?) \\(must be v1 or v2\\)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"parquet/src/main/java/org/apache/iceberg/parquet/Parquet.java","lineNumber":802,"sourceCode":"            ImmutableMap.of(),\n            dictionaryEnabled,\n            ImmutableMap.of(),\n            dataContext.trackUncompressedRowGroupSize());\n      }\n\n      private static CompressionCodecName toCodec(String codecAsString) {\n        try {\n          return CompressionCodecName.valueOf(codecAsString.toUpperCase(Locale.ROOT));\n        } catch (IllegalArgumentException e) {\n          throw new IllegalArgumentException(\"Unsupported compression codec: \" + codecAsString);\n        }\n      }\n\n      private static WriterVersion toWriterVersion(String pageVersion) {\n        try {\n          return WriterVersion.fromString(pageVersion);\n        } catch (IllegalArgumentException e) {\n          throw new IllegalArgumentException(\n              \"Unsupported Parquet page version: \" + pageVersion + \" (must be v1 or v2)\");\n        }\n      }\n\n      int rowGroupSize() {\n        return rowGroupSize;\n      }\n\n      int pageSize() {\n        return pageSize;\n      }\n\n      int pageRowLimit() {\n        return pageRowLimit;\n      }\n\n      int dictionaryPageSize() {\n        return dictionaryPageSize;","sourceCodeStart":784,"sourceCodeEnd":820,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/parquet/src/main/java/org/apache/iceberg/parquet/Parquet.java#L784-L820","documentation":"Parquet.Context.toWriterVersion converts the configured Parquet page format version string to a parquet WriterVersion; unparseable values raise this IllegalArgumentException. Only v1/v2 page formats are accepted.","triggerScenarios":"Setting write.parquet.page-version (Parquet.PARQUET_PAGE_VERSION) to a string other than what WriterVersion.fromString accepts, e.g. 'v3' or 'parquet1'.","commonSituations":"Typos in table/Spark config ('2' vs 'v2'); copying configs from other engines that use different naming for page versions.","solutions":["Set the page version to 'v1' or 'v2' exactly","Check the property value for stray characters/casing","Remove the property to use the library default"],"exampleFix":"// before\nspark.conf.set(\"write.parquet.page-version\", \"2\")\n// after\nspark.conf.set(\"write.parquet.page-version\", \"v2\")","handlingStrategy":"validation","validationCode":"String pageVersion = props.getProperty(\"write.parquet.page-version\");\nif (pageVersion != null) {\n  Preconditions.checkArgument(pageVersion.equals(\"v1\") || pageVersion.equals(\"v2\"), \"Unsupported Parquet page version: %s (must be v1 or v2)\", pageVersion);\n}","typeGuard":null,"tryCatchPattern":"try {\n  newContext();\n} catch (IllegalArgumentException e) {\n  if (e.getMessage().contains(\"Unsupported Parquet page version\")) { /* fix property to v1 or v2 */ }\n  else throw e;\n}","preventionTips":["Only set page-version to the literal strings v1 or v2","Centralize Parquet writer config parsing with validation","Consult Iceberg docs for accepted property values before copying engine configs"],"tags":["parquet","configuration","page-format"],"backgroundTag":"invalid-enum-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"}