{"record":{"id":"8fa703ab481a7b01","repo":"apache/iceberg","slug":"classname-doesn-t-implement-setpagesource-pagere","errorCode":null,"errorMessage":"<className> doesn't implement setPageSource(PageReadStore)","messagePattern":"<className> doesn't implement setPageSource\\(PageReadStore\\)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"parquet/src/main/java/org/apache/iceberg/parquet/ParquetValueReader.java","lineNumber":32,"sourceCode":" * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.iceberg.parquet;\n\nimport java.util.List;\nimport org.apache.parquet.column.page.PageReadStore;\n\npublic interface ParquetValueReader<T> {\n  T read(T reuse);\n\n  TripleIterator<?> column();\n\n  List<TripleIterator<?>> columns();\n\n  default void setPageSource(PageReadStore pageStore) {\n    throw new UnsupportedOperationException(\n        this.getClass().getName() + \" doesn't implement setPageSource(PageReadStore)\");\n  }\n}\n","sourceCodeStart":14,"sourceCodeEnd":36,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/parquet/src/main/java/org/apache/iceberg/parquet/ParquetValueReader.java#L14-L36","documentation":"ParquetValueReader.setPageSource has a default implementation that throws UnsupportedOperationException; concrete reader implementations that do not support per-row-group page sourcing hit this. It signals the reader implementation is being used in a context that requires setPageSource but never implemented it.","triggerScenarios":"Calling setPageSource(PageReadStore) on a ParquetValueReader whose class only provides the default implementation, e.g. when a read model/schema assigns a reader type that doesn't implement page sourcing (custom readers, some specialized readers like constant/null readers).","commonSituations":"Custom ParquetValueReader implementations missing the override; using a reader designed for non-page-based reads in the standard row-group reading path; internal wiring bugs after upgrades changing reader composition.","solutions":["Override setPageSource(PageReadStore) in your custom reader, forwarding pages to each child column reader.","Use the standard Iceberg reader implementations (e.g. those built by ParquetValueReaders) that implement setPageSource.","Check whether an Iceberg/Parquet upgrade changed reader composition and update custom readers accordingly.","Audit the read model construction so only page-source-capable readers are wired into the reading path."],"exampleFix":"// before\nclass MyReader<T> implements ParquetValueReader<T> { /* no setPageSource */ }\n// after\nclass MyReader<T> implements ParquetValueReader<T> {\n  @Override\n  public void setPageSource(PageReadStore pageStore) {\n    this.pages = pageStore;\n    columnReaders.forEach(r -> r.setPageSource(pageStore));\n  }\n}","handlingStrategy":"type-guard","validationCode":"if (!(reader instanceof PageSourceCapable)) {\n  throw new IllegalStateException(\"Reader must implement setPageSource\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  reader.setPageSource(pageStore);\n} catch (UnsupportedOperationException e) {\n  throw new IllegalStateException(\"Incompatible reader: \" + reader.getClass(), e);\n}","preventionTips":["Override setPageSource in all custom ParquetValueReader implementations.","Prefer standard ParquetValueReaders factory methods when composing readers.","Re-test custom readers after Iceberg/Parquet upgrades."],"tags":["parquet","reader","unsupported-operation","abstract-method"],"backgroundTag":"method-not-implemented","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"}