apache/iceberg · error · UnsupportedOperationException
doesn't implement setPageSource(PageReadStore)
Error message
<className> doesn't implement setPageSource(PageReadStore)
What it means
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.
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.
Example fix
// before
class MyReader<T> implements ParquetValueReader<T> { /* no setPageSource */ }
// after
class MyReader<T> implements ParquetValueReader<T> {
@Override
public void setPageSource(PageReadStore pageStore) {
this.pages = pageStore;
columnReaders.forEach(r -> r.setPageSource(pageStore));
}
} Defensive patterns
Strategy: type-guard
Validate before calling
if (!(reader instanceof PageSourceCapable)) {
throw new IllegalStateException("Reader must implement setPageSource");
} Try / catch
try {
reader.setPageSource(pageStore);
} catch (UnsupportedOperationException e) {
throw new IllegalStateException("Incompatible reader: " + reader.getClass(), e);
} Prevention
- Override setPageSource in all custom ParquetValueReader implementations.
- Prefer standard ParquetValueReaders factory methods when composing readers.
- Re-test custom readers after Iceberg/Parquet upgrades.
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- Batch reading is not supported in non-vectorized reader
- AlwaysFalse is a placeholder only
- AlwaysTrue is a placeholder only
- Cannot read data task.
- doesn't implement setRowGroupInfo(PageReadStore…
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/8fa703ab481a7b01.
Report an issue: GitHub.
Appendix: source
Thrown at parquet/src/main/java/org/apache/iceberg/parquet/ParquetValueReader.java:32
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.iceberg.parquet;
import java.util.List;
import org.apache.parquet.column.page.PageReadStore;
public interface ParquetValueReader<T> {
T read(T reuse);
TripleIterator<?> column();
List<TripleIterator<?>> columns();
default void setPageSource(PageReadStore pageStore) {
throw new UnsupportedOperationException(
this.getClass().getName() + " doesn't implement setPageSource(PageReadStore)");
}
}
View on GitHub (pinned to 86d9c8fc54)