blob: b5c9825a52a859a8aa4ad76cffd9b0a803478bcb [file] [log] [blame]
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="canonical" href="https://py.iceberg.apache.org/reference/pyiceberg/avro/reader/">
<link rel="prev" href="../file/">
<link rel="next" href="../resolver/">
<link rel="icon" href="../../../../assets/images/iceberg-logo-icon.png">
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.6.21">
<title>reader - PyIceberg</title>
<link rel="stylesheet" href="../../../../assets/stylesheets/main.2a3383ac.min.css">
<link rel="stylesheet" href="../../../../assets/stylesheets/palette.06af60db.min.css">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
<style>:root{--md-text-font:"Lato";--md-code-font:"Roboto Mono"}</style>
<link rel="stylesheet" href="../../../../assets/_mkdocstrings.css">
<script>__md_scope=new URL("../../../..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setDoNotTrack", true]);
_paq.push(["disableCookies"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://analytics.apache.org/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '82']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo -->
</head>
<body dir="ltr" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" for="__drawer"></label>
<div data-md-component="skip">
<a href="#pyiceberg.avro.reader" class="md-skip">
Skip to content
</a>
</div>
<div data-md-component="announce">
</div>
<header class="md-header md-header--shadow md-header--lifted" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../../../.." title="PyIceberg" class="md-header__button md-logo" aria-label="PyIceberg" data-md-component="logo">
<img src="../../../../assets/images/iceberg-logo-icon.png" alt="logo">
</a>
<label class="md-header__button md-icon" for="__drawer">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
</label>
<div class="md-header__title" data-md-component="header-title">
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
PyIceberg
</span>
</div>
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
reader
</span>
</div>
</div>
</div>
<form class="md-header__option" data-md-component="palette">
<input class="md-option" data-md-color-media="" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_0">
<label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_1" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4m0 10a6 6 0 0 1-6-6 6 6 0 0 1 6-6 6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg>
</label>
<input class="md-option" data-md-color-media="" data-md-color-scheme="slate" data-md-color-primary="indigo" data-md-color-accent="indigo" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_1">
<label class="md-header__button md-icon" title="Switch to light mode" for="__palette_0" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6a6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg>
</label>
</form>
<script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
<label class="md-header__button md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
</label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
<label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
</label>
<nav class="md-search__options" aria-label="Search">
<button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
</button>
</nav>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
<div class="md-search-result" data-md-component="search-result">
<div class="md-search-result__meta">
Initializing search
</div>
<ol class="md-search-result__list" role="presentation"></ol>
</div>
</div>
</div>
</div>
</div>
<div class="md-header__source">
<a href="https://github.com/apache/iceberg-python" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M439.6 236.1 244 40.5c-5.4-5.5-12.8-8.5-20.4-8.5s-15 3-20.4 8.4L162.5 81l51.5 51.5c27.1-9.1 52.7 16.8 43.4 43.7l49.7 49.7c34.2-11.8 61.2 31 35.5 56.7-26.5 26.5-70.2-2.9-56-37.3L240.3 199v121.9c25.3 12.5 22.3 41.8 9.1 55-6.4 6.4-15.2 10.1-24.3 10.1s-17.8-3.6-24.3-10.1c-17.6-17.6-11.1-46.9 11.2-56v-123c-20.8-8.5-24.6-30.7-18.6-45L142.6 101 8.5 235.1C3 240.6 0 247.9 0 255.5s3 15 8.5 20.4l195.6 195.7c5.4 5.4 12.7 8.4 20.4 8.4s15-3 20.4-8.4l194.7-194.7c5.4-5.4 8.4-12.8 8.4-20.4s-3-15-8.4-20.4"/></svg>
</div>
<div class="md-source__repository">
apache/iceberg-python
</div>
</a>
</div>
</nav>
<nav class="md-tabs" aria-label="Tabs" data-md-component="tabs">
<div class="md-grid">
<ul class="md-tabs__list">
<li class="md-tabs__item">
<a href="../../../.." class="md-tabs__link">
Getting started
</a>
</li>
<li class="md-tabs__item">
<a href="../../../../configuration/" class="md-tabs__link">
Configuration
</a>
</li>
<li class="md-tabs__item">
<a href="../../../../cli/" class="md-tabs__link">
CLI
</a>
</li>
<li class="md-tabs__item">
<a href="../../../../api/" class="md-tabs__link">
API
</a>
</li>
<li class="md-tabs__item">
<a href="../../../../contributing/" class="md-tabs__link">
Contributing
</a>
</li>
<li class="md-tabs__item">
<a href="../../../../community/" class="md-tabs__link">
Community
</a>
</li>
<li class="md-tabs__item">
<a href="../../../../verify-release/" class="md-tabs__link">
Releases
</a>
</li>
<li class="md-tabs__item md-tabs__item--active">
<a href="../../" class="md-tabs__link">
Code Reference
</a>
</li>
</ul>
</div>
</nav>
</header>
<div class="md-container" data-md-component="container">
<main class="md-main" data-md-component="main">
<div class="md-main__inner md-grid">
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary md-nav--lifted" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer">
<a href="../../../.." title="PyIceberg" class="md-nav__button md-logo" aria-label="PyIceberg" data-md-component="logo">
<img src="../../../../assets/images/iceberg-logo-icon.png" alt="logo">
</a>
PyIceberg
</label>
<div class="md-nav__source">
<a href="https://github.com/apache/iceberg-python" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M439.6 236.1 244 40.5c-5.4-5.5-12.8-8.5-20.4-8.5s-15 3-20.4 8.4L162.5 81l51.5 51.5c27.1-9.1 52.7 16.8 43.4 43.7l49.7 49.7c34.2-11.8 61.2 31 35.5 56.7-26.5 26.5-70.2-2.9-56-37.3L240.3 199v121.9c25.3 12.5 22.3 41.8 9.1 55-6.4 6.4-15.2 10.1-24.3 10.1s-17.8-3.6-24.3-10.1c-17.6-17.6-11.1-46.9 11.2-56v-123c-20.8-8.5-24.6-30.7-18.6-45L142.6 101 8.5 235.1C3 240.6 0 247.9 0 255.5s3 15 8.5 20.4l195.6 195.7c5.4 5.4 12.7 8.4 20.4 8.4s15-3 20.4-8.4l194.7-194.7c5.4-5.4 8.4-12.8 8.4-20.4s-3-15-8.4-20.4"/></svg>
</div>
<div class="md-source__repository">
apache/iceberg-python
</div>
</a>
</div>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../../.." class="md-nav__link">
<span class="md-ellipsis">
Getting started
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../../configuration/" class="md-nav__link">
<span class="md-ellipsis">
Configuration
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../../cli/" class="md-nav__link">
<span class="md-ellipsis">
CLI
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4" >
<div class="md-nav__link md-nav__container">
<a href="../../../../api/" class="md-nav__link ">
<span class="md-ellipsis">
API
</span>
</a>
<label class="md-nav__link " for="__nav_4" id="__nav_4_label" tabindex="0">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4">
<span class="md-nav__icon md-icon"></span>
API
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../../../row-filter-syntax/" class="md-nav__link">
<span class="md-ellipsis">
Row Filter Syntax
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../../expression-dsl/" class="md-nav__link">
<span class="md-ellipsis">
Expression DSL
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../../../../contributing/" class="md-nav__link">
<span class="md-ellipsis">
Contributing
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../../community/" class="md-nav__link">
<span class="md-ellipsis">
Community
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_7" >
<label class="md-nav__link" for="__nav_7" id="__nav_7_label" tabindex="0">
<span class="md-ellipsis">
Releases
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_7_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_7">
<span class="md-nav__icon md-icon"></span>
Releases
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../../../verify-release/" class="md-nav__link">
<span class="md-ellipsis">
Verify a release
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../../how-to-release/" class="md-nav__link">
<span class="md-ellipsis">
How to release
</span>
</a>
</li>
<li class="md-nav__item">
<a href="https://github.com/apache/iceberg-python/releases" class="md-nav__link">
<span class="md-ellipsis">
Release Notes
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../../nightly-build/" class="md-nav__link">
<span class="md-ellipsis">
Nightly Build
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--active md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_8" checked>
<label class="md-nav__link" for="__nav_8" id="__nav_8_label" tabindex="">
<span class="md-ellipsis">
Code Reference
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_8_label" aria-expanded="true">
<label class="md-nav__title" for="__nav_8">
<span class="md-nav__icon md-icon"></span>
Code Reference
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_8_1" checked>
<div class="md-nav__link md-nav__container">
<a href="../../" class="md-nav__link ">
<span class="md-ellipsis">
pyiceberg
</span>
</a>
<label class="md-nav__link " for="__nav_8_1" id="__nav_8_1_label" tabindex="0">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_8_1_label" aria-expanded="true">
<label class="md-nav__title" for="__nav_8_1">
<span class="md-nav__icon md-icon"></span>
pyiceberg
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_8_1_1" checked>
<div class="md-nav__link md-nav__container">
<a href="../" class="md-nav__link ">
<span class="md-ellipsis">
avro
</span>
</a>
<label class="md-nav__link " for="__nav_8_1_1" id="__nav_8_1_1_label" tabindex="0">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_8_1_1_label" aria-expanded="true">
<label class="md-nav__title" for="__nav_8_1_1">
<span class="md-nav__icon md-icon"></span>
avro
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_8_1_1_1" >
<div class="md-nav__link md-nav__container">
<a href="../codecs/" class="md-nav__link ">
<span class="md-ellipsis">
codecs
</span>
</a>
<label class="md-nav__link " for="__nav_8_1_1_1" id="__nav_8_1_1_1_label" tabindex="0">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<nav class="md-nav" data-md-level="4" aria-labelledby="__nav_8_1_1_1_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_8_1_1_1">
<span class="md-nav__icon md-icon"></span>
codecs
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../codecs/bzip2/" class="md-nav__link">
<span class="md-ellipsis">
bzip2
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../codecs/codec/" class="md-nav__link">
<span class="md-ellipsis">
codec
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../codecs/deflate/" class="md-nav__link">
<span class="md-ellipsis">
deflate
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../codecs/snappy_codec/" class="md-nav__link">
<span class="md-ellipsis">
snappy_codec
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../codecs/zstandard_codec/" class="md-nav__link">
<span class="md-ellipsis">
zstandard_codec
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../decoder/" class="md-nav__link">
<span class="md-ellipsis">
decoder
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../encoder/" class="md-nav__link">
<span class="md-ellipsis">
encoder
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../file/" class="md-nav__link">
<span class="md-ellipsis">
file
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--active">
<input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
<label class="md-nav__link md-nav__link--active" for="__toc">
<span class="md-ellipsis">
reader
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<a href="./" class="md-nav__link md-nav__link--active">
<span class="md-ellipsis">
reader
</span>
</a>
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader" class="md-nav__link">
<span class="md-ellipsis">
reader
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.BinaryReader" class="md-nav__link">
<span class="md-ellipsis">
BinaryReader
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.DateReader" class="md-nav__link">
<span class="md-ellipsis">
DateReader
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.DecimalReader" class="md-nav__link">
<span class="md-ellipsis">
DecimalReader
</span>
</a>
<nav class="md-nav" aria-label="DecimalReader">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.DecimalReader.__repr__" class="md-nav__link">
<span class="md-ellipsis">
__repr__
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.FixedReader" class="md-nav__link">
<span class="md-ellipsis">
FixedReader
</span>
</a>
<nav class="md-nav" aria-label="FixedReader">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.FixedReader.__len__" class="md-nav__link">
<span class="md-ellipsis">
__len__
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.FixedReader.__repr__" class="md-nav__link">
<span class="md-ellipsis">
__repr__
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.IntegerReader" class="md-nav__link">
<span class="md-ellipsis">
IntegerReader
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.ListReader" class="md-nav__link">
<span class="md-ellipsis">
ListReader
</span>
</a>
<nav class="md-nav" aria-label="ListReader">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.ListReader.__hash__" class="md-nav__link">
<span class="md-ellipsis">
__hash__
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.MapReader" class="md-nav__link">
<span class="md-ellipsis">
MapReader
</span>
</a>
<nav class="md-nav" aria-label="MapReader">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.MapReader.__hash__" class="md-nav__link">
<span class="md-ellipsis">
__hash__
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.Reader" class="md-nav__link">
<span class="md-ellipsis">
Reader
</span>
</a>
<nav class="md-nav" aria-label="Reader">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.Reader.__repr__" class="md-nav__link">
<span class="md-ellipsis">
__repr__
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.StructReader" class="md-nav__link">
<span class="md-ellipsis">
StructReader
</span>
</a>
<nav class="md-nav" aria-label="StructReader">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.StructReader.__eq__" class="md-nav__link">
<span class="md-ellipsis">
__eq__
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.StructReader.__hash__" class="md-nav__link">
<span class="md-ellipsis">
__hash__
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.StructReader.__repr__" class="md-nav__link">
<span class="md-ellipsis">
__repr__
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.TimeReader" class="md-nav__link">
<span class="md-ellipsis">
TimeReader
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.TimestampNanoReader" class="md-nav__link">
<span class="md-ellipsis">
TimestampNanoReader
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.TimestampReader" class="md-nav__link">
<span class="md-ellipsis">
TimestampReader
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.TimestamptzNanoReader" class="md-nav__link">
<span class="md-ellipsis">
TimestamptzNanoReader
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.TimestamptzReader" class="md-nav__link">
<span class="md-ellipsis">
TimestamptzReader
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../resolver/" class="md-nav__link">
<span class="md-ellipsis">
resolver
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../writer/" class="md-nav__link">
<span class="md-ellipsis">
writer
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_8_1_2" >
<div class="md-nav__link md-nav__container">
<a href="../../catalog/" class="md-nav__link ">
<span class="md-ellipsis">
catalog
</span>
</a>
<label class="md-nav__link " for="__nav_8_1_2" id="__nav_8_1_2_label" tabindex="0">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_8_1_2_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_8_1_2">
<span class="md-nav__icon md-icon"></span>
catalog
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../catalog/bigquery_metastore/" class="md-nav__link">
<span class="md-ellipsis">
bigquery_metastore
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../catalog/dynamodb/" class="md-nav__link">
<span class="md-ellipsis">
dynamodb
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../catalog/glue/" class="md-nav__link">
<span class="md-ellipsis">
glue
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../catalog/hive/" class="md-nav__link">
<span class="md-ellipsis">
hive
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../catalog/memory/" class="md-nav__link">
<span class="md-ellipsis">
memory
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../catalog/noop/" class="md-nav__link">
<span class="md-ellipsis">
noop
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_8_1_2_7" >
<div class="md-nav__link md-nav__container">
<a href="../../catalog/rest/" class="md-nav__link ">
<span class="md-ellipsis">
rest
</span>
</a>
<label class="md-nav__link " for="__nav_8_1_2_7" id="__nav_8_1_2_7_label" tabindex="0">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<nav class="md-nav" data-md-level="4" aria-labelledby="__nav_8_1_2_7_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_8_1_2_7">
<span class="md-nav__icon md-icon"></span>
rest
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../catalog/rest/auth/" class="md-nav__link">
<span class="md-ellipsis">
auth
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../catalog/rest/response/" class="md-nav__link">
<span class="md-ellipsis">
response
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../../catalog/sql/" class="md-nav__link">
<span class="md-ellipsis">
sql
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_8_1_3" >
<div class="md-nav__link md-nav__container">
<a href="../../cli/" class="md-nav__link ">
<span class="md-ellipsis">
cli
</span>
</a>
<label class="md-nav__link " for="__nav_8_1_3" id="__nav_8_1_3_label" tabindex="0">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_8_1_3_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_8_1_3">
<span class="md-nav__icon md-icon"></span>
cli
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../cli/console/" class="md-nav__link">
<span class="md-ellipsis">
console
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../cli/output/" class="md-nav__link">
<span class="md-ellipsis">
output
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../../conversions/" class="md-nav__link">
<span class="md-ellipsis">
conversions
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../exceptions/" class="md-nav__link">
<span class="md-ellipsis">
exceptions
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_8_1_6" >
<div class="md-nav__link md-nav__container">
<a href="../../expressions/" class="md-nav__link ">
<span class="md-ellipsis">
expressions
</span>
</a>
<label class="md-nav__link " for="__nav_8_1_6" id="__nav_8_1_6_label" tabindex="0">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_8_1_6_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_8_1_6">
<span class="md-nav__icon md-icon"></span>
expressions
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../expressions/literals/" class="md-nav__link">
<span class="md-ellipsis">
literals
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../expressions/parser/" class="md-nav__link">
<span class="md-ellipsis">
parser
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../expressions/visitors/" class="md-nav__link">
<span class="md-ellipsis">
visitors
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_8_1_7" >
<div class="md-nav__link md-nav__container">
<a href="../../io/" class="md-nav__link ">
<span class="md-ellipsis">
io
</span>
</a>
<label class="md-nav__link " for="__nav_8_1_7" id="__nav_8_1_7_label" tabindex="0">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_8_1_7_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_8_1_7">
<span class="md-nav__icon md-icon"></span>
io
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../io/fsspec/" class="md-nav__link">
<span class="md-ellipsis">
fsspec
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../io/pyarrow/" class="md-nav__link">
<span class="md-ellipsis">
pyarrow
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../../manifest/" class="md-nav__link">
<span class="md-ellipsis">
manifest
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../partitioning/" class="md-nav__link">
<span class="md-ellipsis">
partitioning
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../schema/" class="md-nav__link">
<span class="md-ellipsis">
schema
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../serializers/" class="md-nav__link">
<span class="md-ellipsis">
serializers
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_8_1_12" >
<div class="md-nav__link md-nav__container">
<a href="../../table/" class="md-nav__link ">
<span class="md-ellipsis">
table
</span>
</a>
<label class="md-nav__link " for="__nav_8_1_12" id="__nav_8_1_12_label" tabindex="0">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_8_1_12_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_8_1_12">
<span class="md-nav__icon md-icon"></span>
table
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../table/inspect/" class="md-nav__link">
<span class="md-ellipsis">
inspect
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../table/locations/" class="md-nav__link">
<span class="md-ellipsis">
locations
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../table/maintenance/" class="md-nav__link">
<span class="md-ellipsis">
maintenance
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../table/metadata/" class="md-nav__link">
<span class="md-ellipsis">
metadata
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../table/name_mapping/" class="md-nav__link">
<span class="md-ellipsis">
name_mapping
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../table/puffin/" class="md-nav__link">
<span class="md-ellipsis">
puffin
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../table/refs/" class="md-nav__link">
<span class="md-ellipsis">
refs
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../table/snapshots/" class="md-nav__link">
<span class="md-ellipsis">
snapshots
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../table/sorting/" class="md-nav__link">
<span class="md-ellipsis">
sorting
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../table/statistics/" class="md-nav__link">
<span class="md-ellipsis">
statistics
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_8_1_12_11" >
<div class="md-nav__link md-nav__container">
<a href="../../table/update/" class="md-nav__link ">
<span class="md-ellipsis">
update
</span>
</a>
<label class="md-nav__link " for="__nav_8_1_12_11" id="__nav_8_1_12_11_label" tabindex="0">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<nav class="md-nav" data-md-level="4" aria-labelledby="__nav_8_1_12_11_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_8_1_12_11">
<span class="md-nav__icon md-icon"></span>
update
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../table/update/schema/" class="md-nav__link">
<span class="md-ellipsis">
schema
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../table/update/snapshot/" class="md-nav__link">
<span class="md-ellipsis">
snapshot
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../table/update/sorting/" class="md-nav__link">
<span class="md-ellipsis">
sorting
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../table/update/spec/" class="md-nav__link">
<span class="md-ellipsis">
spec
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../table/update/statistics/" class="md-nav__link">
<span class="md-ellipsis">
statistics
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../table/update/validate/" class="md-nav__link">
<span class="md-ellipsis">
validate
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../../table/upsert_util/" class="md-nav__link">
<span class="md-ellipsis">
upsert_util
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../../transforms/" class="md-nav__link">
<span class="md-ellipsis">
transforms
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../typedef/" class="md-nav__link">
<span class="md-ellipsis">
typedef
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../types/" class="md-nav__link">
<span class="md-ellipsis">
types
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_8_1_16" >
<div class="md-nav__link md-nav__container">
<a href="../../utils/" class="md-nav__link ">
<span class="md-ellipsis">
utils
</span>
</a>
<label class="md-nav__link " for="__nav_8_1_16" id="__nav_8_1_16_label" tabindex="0">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_8_1_16_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_8_1_16">
<span class="md-nav__icon md-icon"></span>
utils
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../utils/bin_packing/" class="md-nav__link">
<span class="md-ellipsis">
bin_packing
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../utils/concurrent/" class="md-nav__link">
<span class="md-ellipsis">
concurrent
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../utils/config/" class="md-nav__link">
<span class="md-ellipsis">
config
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../utils/datetime/" class="md-nav__link">
<span class="md-ellipsis">
datetime
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../utils/decimal/" class="md-nav__link">
<span class="md-ellipsis">
decimal
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../utils/deprecated/" class="md-nav__link">
<span class="md-ellipsis">
deprecated
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../utils/lazydict/" class="md-nav__link">
<span class="md-ellipsis">
lazydict
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../utils/parsing/" class="md-nav__link">
<span class="md-ellipsis">
parsing
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../utils/properties/" class="md-nav__link">
<span class="md-ellipsis">
properties
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../utils/schema_conversion/" class="md-nav__link">
<span class="md-ellipsis">
schema_conversion
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../utils/singleton/" class="md-nav__link">
<span class="md-ellipsis">
singleton
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../utils/truncate/" class="md-nav__link">
<span class="md-ellipsis">
truncate
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader" class="md-nav__link">
<span class="md-ellipsis">
reader
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.BinaryReader" class="md-nav__link">
<span class="md-ellipsis">
BinaryReader
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.DateReader" class="md-nav__link">
<span class="md-ellipsis">
DateReader
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.DecimalReader" class="md-nav__link">
<span class="md-ellipsis">
DecimalReader
</span>
</a>
<nav class="md-nav" aria-label="DecimalReader">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.DecimalReader.__repr__" class="md-nav__link">
<span class="md-ellipsis">
__repr__
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.FixedReader" class="md-nav__link">
<span class="md-ellipsis">
FixedReader
</span>
</a>
<nav class="md-nav" aria-label="FixedReader">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.FixedReader.__len__" class="md-nav__link">
<span class="md-ellipsis">
__len__
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.FixedReader.__repr__" class="md-nav__link">
<span class="md-ellipsis">
__repr__
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.IntegerReader" class="md-nav__link">
<span class="md-ellipsis">
IntegerReader
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.ListReader" class="md-nav__link">
<span class="md-ellipsis">
ListReader
</span>
</a>
<nav class="md-nav" aria-label="ListReader">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.ListReader.__hash__" class="md-nav__link">
<span class="md-ellipsis">
__hash__
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.MapReader" class="md-nav__link">
<span class="md-ellipsis">
MapReader
</span>
</a>
<nav class="md-nav" aria-label="MapReader">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.MapReader.__hash__" class="md-nav__link">
<span class="md-ellipsis">
__hash__
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.Reader" class="md-nav__link">
<span class="md-ellipsis">
Reader
</span>
</a>
<nav class="md-nav" aria-label="Reader">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.Reader.__repr__" class="md-nav__link">
<span class="md-ellipsis">
__repr__
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.StructReader" class="md-nav__link">
<span class="md-ellipsis">
StructReader
</span>
</a>
<nav class="md-nav" aria-label="StructReader">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.StructReader.__eq__" class="md-nav__link">
<span class="md-ellipsis">
__eq__
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.StructReader.__hash__" class="md-nav__link">
<span class="md-ellipsis">
__hash__
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.StructReader.__repr__" class="md-nav__link">
<span class="md-ellipsis">
__repr__
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.TimeReader" class="md-nav__link">
<span class="md-ellipsis">
TimeReader
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.TimestampNanoReader" class="md-nav__link">
<span class="md-ellipsis">
TimestampNanoReader
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.TimestampReader" class="md-nav__link">
<span class="md-ellipsis">
TimestampReader
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.TimestamptzNanoReader" class="md-nav__link">
<span class="md-ellipsis">
TimestamptzNanoReader
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#pyiceberg.avro.reader.TimestamptzReader" class="md-nav__link">
<span class="md-ellipsis">
TimestamptzReader
</span>
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content" data-md-component="content">
<article class="md-content__inner md-typeset">
<h1>reader</h1>
<div class="doc doc-object doc-module">
<a id="pyiceberg.avro.reader"></a>
<div class="doc doc-contents first">
<p>Classes for building the Reader tree.</p>
<p>Constructing a reader tree from the schema makes it easy
to decouple the reader implementation from the schema.</p>
<p>The reader tree can be changed in such a way that the
read schema is different, while respecting the read schema.</p>
<div class="doc doc-children">
<div class="doc doc-object doc-class">
<h2 id="pyiceberg.avro.reader.BinaryReader" class="doc doc-heading">
<code>BinaryReader</code>
<a href="#pyiceberg.avro.reader.BinaryReader" class="headerlink" title="Permanent link">&para;</a></h2>
<div class="doc doc-contents ">
<p class="doc doc-class-bases">
Bases: <code><a class="autorefs autorefs-internal" title="Reader (pyiceberg.avro.reader.Reader)" href="#pyiceberg.avro.reader.Reader">Reader</a></code></p>
<p>Read a binary value.</p>
<p>First reads an integer, to get the length of the binary value,
then reads the binary field itself.</p>
<details class="quote">
<summary>Source code in <code>pyiceberg/avro/reader.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-249">249</a></span>
<span class="normal"><a href="#__codelineno-0-250">250</a></span>
<span class="normal"><a href="#__codelineno-0-251">251</a></span>
<span class="normal"><a href="#__codelineno-0-252">252</a></span>
<span class="normal"><a href="#__codelineno-0-253">253</a></span>
<span class="normal"><a href="#__codelineno-0-254">254</a></span>
<span class="normal"><a href="#__codelineno-0-255">255</a></span>
<span class="normal"><a href="#__codelineno-0-256">256</a></span>
<span class="normal"><a href="#__codelineno-0-257">257</a></span>
<span class="normal"><a href="#__codelineno-0-258">258</a></span>
<span class="normal"><a href="#__codelineno-0-259">259</a></span>
<span class="normal"><a href="#__codelineno-0-260">260</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-249" name="__codelineno-0-249"></a><span class="k">class</span><span class="w"> </span><span class="nc">BinaryReader</span><span class="p">(</span><span class="n">Reader</span><span class="p">):</span>
<a id="__codelineno-0-250" name="__codelineno-0-250"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Read a binary value.</span>
<a id="__codelineno-0-251" name="__codelineno-0-251"></a>
<a id="__codelineno-0-252" name="__codelineno-0-252"></a><span class="sd"> First reads an integer, to get the length of the binary value,</span>
<a id="__codelineno-0-253" name="__codelineno-0-253"></a><span class="sd"> then reads the binary field itself.</span>
<a id="__codelineno-0-254" name="__codelineno-0-254"></a><span class="sd"> &quot;&quot;&quot;</span>
<a id="__codelineno-0-255" name="__codelineno-0-255"></a>
<a id="__codelineno-0-256" name="__codelineno-0-256"></a> <span class="k">def</span><span class="w"> </span><span class="nf">read</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">decoder</span><span class="p">:</span> <span class="n">BinaryDecoder</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bytes</span><span class="p">:</span>
<a id="__codelineno-0-257" name="__codelineno-0-257"></a> <span class="k">return</span> <span class="n">decoder</span><span class="o">.</span><span class="n">read_bytes</span><span class="p">()</span>
<a id="__codelineno-0-258" name="__codelineno-0-258"></a>
<a id="__codelineno-0-259" name="__codelineno-0-259"></a> <span class="k">def</span><span class="w"> </span><span class="nf">skip</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">decoder</span><span class="p">:</span> <span class="n">BinaryDecoder</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<a id="__codelineno-0-260" name="__codelineno-0-260"></a> <span class="n">decoder</span><span class="o">.</span><span class="n">skip_bytes</span><span class="p">()</span>
</code></pre></div></td></tr></table></div>
</details>
<div class="doc doc-children">
</div>
</div>
</div>
<div class="doc doc-object doc-class">
<h2 id="pyiceberg.avro.reader.DateReader" class="doc doc-heading">
<code>DateReader</code>
<a href="#pyiceberg.avro.reader.DateReader" class="headerlink" title="Permanent link">&para;</a></h2>
<div class="doc doc-contents ">
<p class="doc doc-class-bases">
Bases: <code><a class="autorefs autorefs-internal" title="IntegerReader (pyiceberg.avro.reader.IntegerReader)" href="#pyiceberg.avro.reader.IntegerReader">IntegerReader</a></code></p>
<p>Reads a day granularity date from the stream.</p>
<p>The number of days from 1 January 1970.</p>
<details class="quote">
<summary>Source code in <code>pyiceberg/avro/reader.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-155">155</a></span>
<span class="normal"><a href="#__codelineno-0-156">156</a></span>
<span class="normal"><a href="#__codelineno-0-157">157</a></span>
<span class="normal"><a href="#__codelineno-0-158">158</a></span>
<span class="normal"><a href="#__codelineno-0-159">159</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-155" name="__codelineno-0-155"></a><span class="k">class</span><span class="w"> </span><span class="nc">DateReader</span><span class="p">(</span><span class="n">IntegerReader</span><span class="p">):</span>
<a id="__codelineno-0-156" name="__codelineno-0-156"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Reads a day granularity date from the stream.</span>
<a id="__codelineno-0-157" name="__codelineno-0-157"></a>
<a id="__codelineno-0-158" name="__codelineno-0-158"></a><span class="sd"> The number of days from 1 January 1970.</span>
<a id="__codelineno-0-159" name="__codelineno-0-159"></a><span class="sd"> &quot;&quot;&quot;</span>
</code></pre></div></td></tr></table></div>
</details>
<div class="doc doc-children">
</div>
</div>
</div>
<div class="doc doc-object doc-class">
<h2 id="pyiceberg.avro.reader.DecimalReader" class="doc doc-heading">
<code>DecimalReader</code>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-dataclass"><code>dataclass</code></small>
</span>
<a href="#pyiceberg.avro.reader.DecimalReader" class="headerlink" title="Permanent link">&para;</a></h2>
<div class="doc doc-contents ">
<p class="doc doc-class-bases">
Bases: <code><a class="autorefs autorefs-internal" title="Reader (pyiceberg.avro.reader.Reader)" href="#pyiceberg.avro.reader.Reader">Reader</a></code></p>
<p>Reads a value as a decimal.</p>
<p>Decimal bytes are decoded as signed short, int or long depending on the
size of bytes.</p>
<details class="quote">
<summary>Source code in <code>pyiceberg/avro/reader.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-263">263</a></span>
<span class="normal"><a href="#__codelineno-0-264">264</a></span>
<span class="normal"><a href="#__codelineno-0-265">265</a></span>
<span class="normal"><a href="#__codelineno-0-266">266</a></span>
<span class="normal"><a href="#__codelineno-0-267">267</a></span>
<span class="normal"><a href="#__codelineno-0-268">268</a></span>
<span class="normal"><a href="#__codelineno-0-269">269</a></span>
<span class="normal"><a href="#__codelineno-0-270">270</a></span>
<span class="normal"><a href="#__codelineno-0-271">271</a></span>
<span class="normal"><a href="#__codelineno-0-272">272</a></span>
<span class="normal"><a href="#__codelineno-0-273">273</a></span>
<span class="normal"><a href="#__codelineno-0-274">274</a></span>
<span class="normal"><a href="#__codelineno-0-275">275</a></span>
<span class="normal"><a href="#__codelineno-0-276">276</a></span>
<span class="normal"><a href="#__codelineno-0-277">277</a></span>
<span class="normal"><a href="#__codelineno-0-278">278</a></span>
<span class="normal"><a href="#__codelineno-0-279">279</a></span>
<span class="normal"><a href="#__codelineno-0-280">280</a></span>
<span class="normal"><a href="#__codelineno-0-281">281</a></span>
<span class="normal"><a href="#__codelineno-0-282">282</a></span>
<span class="normal"><a href="#__codelineno-0-283">283</a></span>
<span class="normal"><a href="#__codelineno-0-284">284</a></span>
<span class="normal"><a href="#__codelineno-0-285">285</a></span>
<span class="normal"><a href="#__codelineno-0-286">286</a></span>
<span class="normal"><a href="#__codelineno-0-287">287</a></span>
<span class="normal"><a href="#__codelineno-0-288">288</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-263" name="__codelineno-0-263"></a><span class="nd">@dataclass</span><span class="p">(</span><span class="n">frozen</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">init</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<a id="__codelineno-0-264" name="__codelineno-0-264"></a><span class="k">class</span><span class="w"> </span><span class="nc">DecimalReader</span><span class="p">(</span><span class="n">Reader</span><span class="p">):</span>
<a id="__codelineno-0-265" name="__codelineno-0-265"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Reads a value as a decimal.</span>
<a id="__codelineno-0-266" name="__codelineno-0-266"></a>
<a id="__codelineno-0-267" name="__codelineno-0-267"></a><span class="sd"> Decimal bytes are decoded as signed short, int or long depending on the</span>
<a id="__codelineno-0-268" name="__codelineno-0-268"></a><span class="sd"> size of bytes.</span>
<a id="__codelineno-0-269" name="__codelineno-0-269"></a><span class="sd"> &quot;&quot;&quot;</span>
<a id="__codelineno-0-270" name="__codelineno-0-270"></a>
<a id="__codelineno-0-271" name="__codelineno-0-271"></a> <span class="n">precision</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="n">dataclassfield</span><span class="p">()</span>
<a id="__codelineno-0-272" name="__codelineno-0-272"></a> <span class="n">scale</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="n">dataclassfield</span><span class="p">()</span>
<a id="__codelineno-0-273" name="__codelineno-0-273"></a> <span class="n">_length</span><span class="p">:</span> <span class="nb">int</span>
<a id="__codelineno-0-274" name="__codelineno-0-274"></a>
<a id="__codelineno-0-275" name="__codelineno-0-275"></a> <span class="k">def</span><span class="w"> </span><span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">precision</span><span class="p">:</span> <span class="nb">int</span><span class="p">,</span> <span class="n">scale</span><span class="p">:</span> <span class="nb">int</span><span class="p">):</span>
<a id="__codelineno-0-276" name="__codelineno-0-276"></a> <span class="nb">object</span><span class="o">.</span><span class="fm">__setattr__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s2">&quot;precision&quot;</span><span class="p">,</span> <span class="n">precision</span><span class="p">)</span>
<a id="__codelineno-0-277" name="__codelineno-0-277"></a> <span class="nb">object</span><span class="o">.</span><span class="fm">__setattr__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s2">&quot;scale&quot;</span><span class="p">,</span> <span class="n">scale</span><span class="p">)</span>
<a id="__codelineno-0-278" name="__codelineno-0-278"></a> <span class="nb">object</span><span class="o">.</span><span class="fm">__setattr__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s2">&quot;_length&quot;</span><span class="p">,</span> <span class="n">decimal_required_bytes</span><span class="p">(</span><span class="n">precision</span><span class="p">))</span>
<a id="__codelineno-0-279" name="__codelineno-0-279"></a>
<a id="__codelineno-0-280" name="__codelineno-0-280"></a> <span class="k">def</span><span class="w"> </span><span class="nf">read</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">decoder</span><span class="p">:</span> <span class="n">BinaryDecoder</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Decimal</span><span class="p">:</span>
<a id="__codelineno-0-281" name="__codelineno-0-281"></a> <span class="k">return</span> <span class="n">bytes_to_decimal</span><span class="p">(</span><span class="n">decoder</span><span class="o">.</span><span class="n">read</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_length</span><span class="p">),</span> <span class="bp">self</span><span class="o">.</span><span class="n">scale</span><span class="p">)</span>
<a id="__codelineno-0-282" name="__codelineno-0-282"></a>
<a id="__codelineno-0-283" name="__codelineno-0-283"></a> <span class="k">def</span><span class="w"> </span><span class="nf">skip</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">decoder</span><span class="p">:</span> <span class="n">BinaryDecoder</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<a id="__codelineno-0-284" name="__codelineno-0-284"></a> <span class="n">decoder</span><span class="o">.</span><span class="n">skip_bytes</span><span class="p">()</span>
<a id="__codelineno-0-285" name="__codelineno-0-285"></a>
<a id="__codelineno-0-286" name="__codelineno-0-286"></a> <span class="k">def</span><span class="w"> </span><span class="fm">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<a id="__codelineno-0-287" name="__codelineno-0-287"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Return the string representation of the DecimalReader class.&quot;&quot;&quot;</span>
<a id="__codelineno-0-288" name="__codelineno-0-288"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;DecimalReader(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">precision</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">scale</span><span class="si">}</span><span class="s2">)&quot;</span>
</code></pre></div></td></tr></table></div>
</details>
<div class="doc doc-children">
<div class="doc doc-object doc-function">
<h3 id="pyiceberg.avro.reader.DecimalReader.__repr__" class="doc doc-heading">
<code class="highlight language-python"><span class="fm">__repr__</span><span class="p">()</span></code>
<a href="#pyiceberg.avro.reader.DecimalReader.__repr__" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="doc doc-contents ">
<p>Return the string representation of the DecimalReader class.</p>
<details class="quote">
<summary>Source code in <code>pyiceberg/avro/reader.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-286">286</a></span>
<span class="normal"><a href="#__codelineno-0-287">287</a></span>
<span class="normal"><a href="#__codelineno-0-288">288</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-286" name="__codelineno-0-286"></a><span class="k">def</span><span class="w"> </span><span class="fm">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<a id="__codelineno-0-287" name="__codelineno-0-287"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Return the string representation of the DecimalReader class.&quot;&quot;&quot;</span>
<a id="__codelineno-0-288" name="__codelineno-0-288"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;DecimalReader(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">precision</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">scale</span><span class="si">}</span><span class="s2">)&quot;</span>
</code></pre></div></td></tr></table></div>
</details>
</div>
</div>
</div>
</div>
</div>
<div class="doc doc-object doc-class">
<h2 id="pyiceberg.avro.reader.FixedReader" class="doc doc-heading">
<code>FixedReader</code>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-dataclass"><code>dataclass</code></small>
</span>
<a href="#pyiceberg.avro.reader.FixedReader" class="headerlink" title="Permanent link">&para;</a></h2>
<div class="doc doc-contents ">
<p class="doc doc-class-bases">
Bases: <code><a class="autorefs autorefs-internal" title="Reader (pyiceberg.avro.reader.Reader)" href="#pyiceberg.avro.reader.Reader">Reader</a></code></p>
<details class="quote">
<summary>Source code in <code>pyiceberg/avro/reader.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-230">230</a></span>
<span class="normal"><a href="#__codelineno-0-231">231</a></span>
<span class="normal"><a href="#__codelineno-0-232">232</a></span>
<span class="normal"><a href="#__codelineno-0-233">233</a></span>
<span class="normal"><a href="#__codelineno-0-234">234</a></span>
<span class="normal"><a href="#__codelineno-0-235">235</a></span>
<span class="normal"><a href="#__codelineno-0-236">236</a></span>
<span class="normal"><a href="#__codelineno-0-237">237</a></span>
<span class="normal"><a href="#__codelineno-0-238">238</a></span>
<span class="normal"><a href="#__codelineno-0-239">239</a></span>
<span class="normal"><a href="#__codelineno-0-240">240</a></span>
<span class="normal"><a href="#__codelineno-0-241">241</a></span>
<span class="normal"><a href="#__codelineno-0-242">242</a></span>
<span class="normal"><a href="#__codelineno-0-243">243</a></span>
<span class="normal"><a href="#__codelineno-0-244">244</a></span>
<span class="normal"><a href="#__codelineno-0-245">245</a></span>
<span class="normal"><a href="#__codelineno-0-246">246</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-230" name="__codelineno-0-230"></a><span class="nd">@dataclass</span><span class="p">(</span><span class="n">frozen</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<a id="__codelineno-0-231" name="__codelineno-0-231"></a><span class="k">class</span><span class="w"> </span><span class="nc">FixedReader</span><span class="p">(</span><span class="n">Reader</span><span class="p">):</span>
<a id="__codelineno-0-232" name="__codelineno-0-232"></a> <span class="n">_len</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="n">dataclassfield</span><span class="p">()</span>
<a id="__codelineno-0-233" name="__codelineno-0-233"></a>
<a id="__codelineno-0-234" name="__codelineno-0-234"></a> <span class="k">def</span><span class="w"> </span><span class="nf">read</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">decoder</span><span class="p">:</span> <span class="n">BinaryDecoder</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bytes</span><span class="p">:</span>
<a id="__codelineno-0-235" name="__codelineno-0-235"></a> <span class="k">return</span> <span class="n">decoder</span><span class="o">.</span><span class="n">read</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="p">))</span>
<a id="__codelineno-0-236" name="__codelineno-0-236"></a>
<a id="__codelineno-0-237" name="__codelineno-0-237"></a> <span class="k">def</span><span class="w"> </span><span class="nf">skip</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">decoder</span><span class="p">:</span> <span class="n">BinaryDecoder</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<a id="__codelineno-0-238" name="__codelineno-0-238"></a> <span class="n">decoder</span><span class="o">.</span><span class="n">skip</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="p">))</span>
<a id="__codelineno-0-239" name="__codelineno-0-239"></a>
<a id="__codelineno-0-240" name="__codelineno-0-240"></a> <span class="k">def</span><span class="w"> </span><span class="fm">__len__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">int</span><span class="p">:</span>
<a id="__codelineno-0-241" name="__codelineno-0-241"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Return the length of an instance of the FixedReader class.&quot;&quot;&quot;</span>
<a id="__codelineno-0-242" name="__codelineno-0-242"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_len</span>
<a id="__codelineno-0-243" name="__codelineno-0-243"></a>
<a id="__codelineno-0-244" name="__codelineno-0-244"></a> <span class="k">def</span><span class="w"> </span><span class="fm">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<a id="__codelineno-0-245" name="__codelineno-0-245"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Return the string representation of the FixedReader class.&quot;&quot;&quot;</span>
<a id="__codelineno-0-246" name="__codelineno-0-246"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;FixedReader(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_len</span><span class="si">}</span><span class="s2">)&quot;</span>
</code></pre></div></td></tr></table></div>
</details>
<div class="doc doc-children">
<div class="doc doc-object doc-function">
<h3 id="pyiceberg.avro.reader.FixedReader.__len__" class="doc doc-heading">
<code class="highlight language-python"><span class="fm">__len__</span><span class="p">()</span></code>
<a href="#pyiceberg.avro.reader.FixedReader.__len__" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="doc doc-contents ">
<p>Return the length of an instance of the FixedReader class.</p>
<details class="quote">
<summary>Source code in <code>pyiceberg/avro/reader.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-240">240</a></span>
<span class="normal"><a href="#__codelineno-0-241">241</a></span>
<span class="normal"><a href="#__codelineno-0-242">242</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-240" name="__codelineno-0-240"></a><span class="k">def</span><span class="w"> </span><span class="fm">__len__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">int</span><span class="p">:</span>
<a id="__codelineno-0-241" name="__codelineno-0-241"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Return the length of an instance of the FixedReader class.&quot;&quot;&quot;</span>
<a id="__codelineno-0-242" name="__codelineno-0-242"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_len</span>
</code></pre></div></td></tr></table></div>
</details>
</div>
</div>
<div class="doc doc-object doc-function">
<h3 id="pyiceberg.avro.reader.FixedReader.__repr__" class="doc doc-heading">
<code class="highlight language-python"><span class="fm">__repr__</span><span class="p">()</span></code>
<a href="#pyiceberg.avro.reader.FixedReader.__repr__" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="doc doc-contents ">
<p>Return the string representation of the FixedReader class.</p>
<details class="quote">
<summary>Source code in <code>pyiceberg/avro/reader.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-244">244</a></span>
<span class="normal"><a href="#__codelineno-0-245">245</a></span>
<span class="normal"><a href="#__codelineno-0-246">246</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-244" name="__codelineno-0-244"></a><span class="k">def</span><span class="w"> </span><span class="fm">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<a id="__codelineno-0-245" name="__codelineno-0-245"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Return the string representation of the FixedReader class.&quot;&quot;&quot;</span>
<a id="__codelineno-0-246" name="__codelineno-0-246"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;FixedReader(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_len</span><span class="si">}</span><span class="s2">)&quot;</span>
</code></pre></div></td></tr></table></div>
</details>
</div>
</div>
</div>
</div>
</div>
<div class="doc doc-object doc-class">
<h2 id="pyiceberg.avro.reader.IntegerReader" class="doc doc-heading">
<code>IntegerReader</code>
<a href="#pyiceberg.avro.reader.IntegerReader" class="headerlink" title="Permanent link">&para;</a></h2>
<div class="doc doc-contents ">
<p class="doc doc-class-bases">
Bases: <code><a class="autorefs autorefs-internal" title="Reader (pyiceberg.avro.reader.Reader)" href="#pyiceberg.avro.reader.Reader">Reader</a></code></p>
<p>Longs and ints are encoded the same way, and there is no long in Python.</p>
<details class="quote">
<summary>Source code in <code>pyiceberg/avro/reader.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-129">129</a></span>
<span class="normal"><a href="#__codelineno-0-130">130</a></span>
<span class="normal"><a href="#__codelineno-0-131">131</a></span>
<span class="normal"><a href="#__codelineno-0-132">132</a></span>
<span class="normal"><a href="#__codelineno-0-133">133</a></span>
<span class="normal"><a href="#__codelineno-0-134">134</a></span>
<span class="normal"><a href="#__codelineno-0-135">135</a></span>
<span class="normal"><a href="#__codelineno-0-136">136</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-129" name="__codelineno-0-129"></a><span class="k">class</span><span class="w"> </span><span class="nc">IntegerReader</span><span class="p">(</span><span class="n">Reader</span><span class="p">):</span>
<a id="__codelineno-0-130" name="__codelineno-0-130"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Longs and ints are encoded the same way, and there is no long in Python.&quot;&quot;&quot;</span>
<a id="__codelineno-0-131" name="__codelineno-0-131"></a>
<a id="__codelineno-0-132" name="__codelineno-0-132"></a> <span class="k">def</span><span class="w"> </span><span class="nf">read</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">decoder</span><span class="p">:</span> <span class="n">BinaryDecoder</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">int</span><span class="p">:</span>
<a id="__codelineno-0-133" name="__codelineno-0-133"></a> <span class="k">return</span> <span class="n">decoder</span><span class="o">.</span><span class="n">read_int</span><span class="p">()</span>
<a id="__codelineno-0-134" name="__codelineno-0-134"></a>
<a id="__codelineno-0-135" name="__codelineno-0-135"></a> <span class="k">def</span><span class="w"> </span><span class="nf">skip</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">decoder</span><span class="p">:</span> <span class="n">BinaryDecoder</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<a id="__codelineno-0-136" name="__codelineno-0-136"></a> <span class="n">decoder</span><span class="o">.</span><span class="n">skip_int</span><span class="p">()</span>
</code></pre></div></td></tr></table></div>
</details>
<div class="doc doc-children">
</div>
</div>
</div>
<div class="doc doc-object doc-class">
<h2 id="pyiceberg.avro.reader.ListReader" class="doc doc-heading">
<code>ListReader</code>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-dataclass"><code>dataclass</code></small>
</span>
<a href="#pyiceberg.avro.reader.ListReader" class="headerlink" title="Permanent link">&para;</a></h2>
<div class="doc doc-contents ">
<p class="doc doc-class-bases">
Bases: <code><a class="autorefs autorefs-internal" title="Reader (pyiceberg.avro.reader.Reader)" href="#pyiceberg.avro.reader.Reader">Reader</a></code></p>
<details class="quote">
<summary>Source code in <code>pyiceberg/avro/reader.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-387">387</a></span>
<span class="normal"><a href="#__codelineno-0-388">388</a></span>
<span class="normal"><a href="#__codelineno-0-389">389</a></span>
<span class="normal"><a href="#__codelineno-0-390">390</a></span>
<span class="normal"><a href="#__codelineno-0-391">391</a></span>
<span class="normal"><a href="#__codelineno-0-392">392</a></span>
<span class="normal"><a href="#__codelineno-0-393">393</a></span>
<span class="normal"><a href="#__codelineno-0-394">394</a></span>
<span class="normal"><a href="#__codelineno-0-395">395</a></span>
<span class="normal"><a href="#__codelineno-0-396">396</a></span>
<span class="normal"><a href="#__codelineno-0-397">397</a></span>
<span class="normal"><a href="#__codelineno-0-398">398</a></span>
<span class="normal"><a href="#__codelineno-0-399">399</a></span>
<span class="normal"><a href="#__codelineno-0-400">400</a></span>
<span class="normal"><a href="#__codelineno-0-401">401</a></span>
<span class="normal"><a href="#__codelineno-0-402">402</a></span>
<span class="normal"><a href="#__codelineno-0-403">403</a></span>
<span class="normal"><a href="#__codelineno-0-404">404</a></span>
<span class="normal"><a href="#__codelineno-0-405">405</a></span>
<span class="normal"><a href="#__codelineno-0-406">406</a></span>
<span class="normal"><a href="#__codelineno-0-407">407</a></span>
<span class="normal"><a href="#__codelineno-0-408">408</a></span>
<span class="normal"><a href="#__codelineno-0-409">409</a></span>
<span class="normal"><a href="#__codelineno-0-410">410</a></span>
<span class="normal"><a href="#__codelineno-0-411">411</a></span>
<span class="normal"><a href="#__codelineno-0-412">412</a></span>
<span class="normal"><a href="#__codelineno-0-413">413</a></span>
<span class="normal"><a href="#__codelineno-0-414">414</a></span>
<span class="normal"><a href="#__codelineno-0-415">415</a></span>
<span class="normal"><a href="#__codelineno-0-416">416</a></span>
<span class="normal"><a href="#__codelineno-0-417">417</a></span>
<span class="normal"><a href="#__codelineno-0-418">418</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-387" name="__codelineno-0-387"></a><span class="nd">@dataclass</span><span class="p">(</span><span class="n">frozen</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">init</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<a id="__codelineno-0-388" name="__codelineno-0-388"></a><span class="k">class</span><span class="w"> </span><span class="nc">ListReader</span><span class="p">(</span><span class="n">Reader</span><span class="p">):</span>
<a id="__codelineno-0-389" name="__codelineno-0-389"></a> <span class="vm">__slots__</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;element&quot;</span><span class="p">,</span> <span class="s2">&quot;_is_int_list&quot;</span><span class="p">,</span> <span class="s2">&quot;_hash&quot;</span><span class="p">)</span>
<a id="__codelineno-0-390" name="__codelineno-0-390"></a> <span class="n">element</span><span class="p">:</span> <span class="n">Reader</span>
<a id="__codelineno-0-391" name="__codelineno-0-391"></a>
<a id="__codelineno-0-392" name="__codelineno-0-392"></a> <span class="k">def</span><span class="w"> </span><span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">element</span><span class="p">:</span> <span class="n">Reader</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<a id="__codelineno-0-393" name="__codelineno-0-393"></a> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">()</span>
<a id="__codelineno-0-394" name="__codelineno-0-394"></a> <span class="bp">self</span><span class="o">.</span><span class="n">element</span> <span class="o">=</span> <span class="n">element</span>
<a id="__codelineno-0-395" name="__codelineno-0-395"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_hash</span> <span class="o">=</span> <span class="nb">hash</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">element</span><span class="p">)</span>
<a id="__codelineno-0-396" name="__codelineno-0-396"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_is_int_list</span> <span class="o">=</span> <span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">element</span><span class="p">,</span> <span class="n">IntegerReader</span><span class="p">)</span>
<a id="__codelineno-0-397" name="__codelineno-0-397"></a>
<a id="__codelineno-0-398" name="__codelineno-0-398"></a> <span class="k">def</span><span class="w"> </span><span class="nf">read</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">decoder</span><span class="p">:</span> <span class="n">BinaryDecoder</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">List</span><span class="p">[</span><span class="n">Any</span><span class="p">]:</span>
<a id="__codelineno-0-399" name="__codelineno-0-399"></a> <span class="n">read_items</span><span class="p">:</span> <span class="n">List</span><span class="p">[</span><span class="n">Any</span><span class="p">]</span> <span class="o">=</span> <span class="p">[]</span>
<a id="__codelineno-0-400" name="__codelineno-0-400"></a> <span class="n">block_count</span> <span class="o">=</span> <span class="n">decoder</span><span class="o">.</span><span class="n">read_int</span><span class="p">()</span>
<a id="__codelineno-0-401" name="__codelineno-0-401"></a> <span class="k">while</span> <span class="n">block_count</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">:</span>
<a id="__codelineno-0-402" name="__codelineno-0-402"></a> <span class="k">if</span> <span class="n">block_count</span> <span class="o">&lt;</span> <span class="mi">0</span><span class="p">:</span>
<a id="__codelineno-0-403" name="__codelineno-0-403"></a> <span class="n">block_count</span> <span class="o">=</span> <span class="o">-</span><span class="n">block_count</span>
<a id="__codelineno-0-404" name="__codelineno-0-404"></a> <span class="n">_</span> <span class="o">=</span> <span class="n">decoder</span><span class="o">.</span><span class="n">read_int</span><span class="p">()</span>
<a id="__codelineno-0-405" name="__codelineno-0-405"></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_is_int_list</span><span class="p">:</span>
<a id="__codelineno-0-406" name="__codelineno-0-406"></a> <span class="n">read_items</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="n">decoder</span><span class="o">.</span><span class="n">read_ints</span><span class="p">(</span><span class="n">block_count</span><span class="p">))</span>
<a id="__codelineno-0-407" name="__codelineno-0-407"></a> <span class="k">else</span><span class="p">:</span>
<a id="__codelineno-0-408" name="__codelineno-0-408"></a> <span class="k">for</span> <span class="n">_</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">block_count</span><span class="p">):</span>
<a id="__codelineno-0-409" name="__codelineno-0-409"></a> <span class="n">read_items</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">element</span><span class="o">.</span><span class="n">read</span><span class="p">(</span><span class="n">decoder</span><span class="p">))</span>
<a id="__codelineno-0-410" name="__codelineno-0-410"></a> <span class="n">block_count</span> <span class="o">=</span> <span class="n">decoder</span><span class="o">.</span><span class="n">read_int</span><span class="p">()</span>
<a id="__codelineno-0-411" name="__codelineno-0-411"></a> <span class="k">return</span> <span class="n">read_items</span>
<a id="__codelineno-0-412" name="__codelineno-0-412"></a>
<a id="__codelineno-0-413" name="__codelineno-0-413"></a> <span class="k">def</span><span class="w"> </span><span class="nf">skip</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">decoder</span><span class="p">:</span> <span class="n">BinaryDecoder</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<a id="__codelineno-0-414" name="__codelineno-0-414"></a> <span class="n">_skip_map_array</span><span class="p">(</span><span class="n">decoder</span><span class="p">,</span> <span class="k">lambda</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">element</span><span class="o">.</span><span class="n">skip</span><span class="p">(</span><span class="n">decoder</span><span class="p">))</span>
<a id="__codelineno-0-415" name="__codelineno-0-415"></a>
<a id="__codelineno-0-416" name="__codelineno-0-416"></a> <span class="k">def</span><span class="w"> </span><span class="fm">__hash__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">int</span><span class="p">:</span>
<a id="__codelineno-0-417" name="__codelineno-0-417"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Return a hashed representation of the ListReader class.&quot;&quot;&quot;</span>
<a id="__codelineno-0-418" name="__codelineno-0-418"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_hash</span>
</code></pre></div></td></tr></table></div>
</details>
<div class="doc doc-children">
<div class="doc doc-object doc-function">
<h3 id="pyiceberg.avro.reader.ListReader.__hash__" class="doc doc-heading">
<code class="highlight language-python"><span class="fm">__hash__</span><span class="p">()</span></code>
<a href="#pyiceberg.avro.reader.ListReader.__hash__" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="doc doc-contents ">
<p>Return a hashed representation of the ListReader class.</p>
<details class="quote">
<summary>Source code in <code>pyiceberg/avro/reader.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-416">416</a></span>
<span class="normal"><a href="#__codelineno-0-417">417</a></span>
<span class="normal"><a href="#__codelineno-0-418">418</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-416" name="__codelineno-0-416"></a><span class="k">def</span><span class="w"> </span><span class="fm">__hash__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">int</span><span class="p">:</span>
<a id="__codelineno-0-417" name="__codelineno-0-417"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Return a hashed representation of the ListReader class.&quot;&quot;&quot;</span>
<a id="__codelineno-0-418" name="__codelineno-0-418"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_hash</span>
</code></pre></div></td></tr></table></div>
</details>
</div>
</div>
</div>
</div>
</div>
<div class="doc doc-object doc-class">
<h2 id="pyiceberg.avro.reader.MapReader" class="doc doc-heading">
<code>MapReader</code>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-dataclass"><code>dataclass</code></small>
</span>
<a href="#pyiceberg.avro.reader.MapReader" class="headerlink" title="Permanent link">&para;</a></h2>
<div class="doc doc-contents ">
<p class="doc doc-class-bases">
Bases: <code><a class="autorefs autorefs-internal" title="Reader (pyiceberg.avro.reader.Reader)" href="#pyiceberg.avro.reader.Reader">Reader</a></code></p>
<details class="quote">
<summary>Source code in <code>pyiceberg/avro/reader.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-425">425</a></span>
<span class="normal"><a href="#__codelineno-0-426">426</a></span>
<span class="normal"><a href="#__codelineno-0-427">427</a></span>
<span class="normal"><a href="#__codelineno-0-428">428</a></span>
<span class="normal"><a href="#__codelineno-0-429">429</a></span>
<span class="normal"><a href="#__codelineno-0-430">430</a></span>
<span class="normal"><a href="#__codelineno-0-431">431</a></span>
<span class="normal"><a href="#__codelineno-0-432">432</a></span>
<span class="normal"><a href="#__codelineno-0-433">433</a></span>
<span class="normal"><a href="#__codelineno-0-434">434</a></span>
<span class="normal"><a href="#__codelineno-0-435">435</a></span>
<span class="normal"><a href="#__codelineno-0-436">436</a></span>
<span class="normal"><a href="#__codelineno-0-437">437</a></span>
<span class="normal"><a href="#__codelineno-0-438">438</a></span>
<span class="normal"><a href="#__codelineno-0-439">439</a></span>
<span class="normal"><a href="#__codelineno-0-440">440</a></span>
<span class="normal"><a href="#__codelineno-0-441">441</a></span>
<span class="normal"><a href="#__codelineno-0-442">442</a></span>
<span class="normal"><a href="#__codelineno-0-443">443</a></span>
<span class="normal"><a href="#__codelineno-0-444">444</a></span>
<span class="normal"><a href="#__codelineno-0-445">445</a></span>
<span class="normal"><a href="#__codelineno-0-446">446</a></span>
<span class="normal"><a href="#__codelineno-0-447">447</a></span>
<span class="normal"><a href="#__codelineno-0-448">448</a></span>
<span class="normal"><a href="#__codelineno-0-449">449</a></span>
<span class="normal"><a href="#__codelineno-0-450">450</a></span>
<span class="normal"><a href="#__codelineno-0-451">451</a></span>
<span class="normal"><a href="#__codelineno-0-452">452</a></span>
<span class="normal"><a href="#__codelineno-0-453">453</a></span>
<span class="normal"><a href="#__codelineno-0-454">454</a></span>
<span class="normal"><a href="#__codelineno-0-455">455</a></span>
<span class="normal"><a href="#__codelineno-0-456">456</a></span>
<span class="normal"><a href="#__codelineno-0-457">457</a></span>
<span class="normal"><a href="#__codelineno-0-458">458</a></span>
<span class="normal"><a href="#__codelineno-0-459">459</a></span>
<span class="normal"><a href="#__codelineno-0-460">460</a></span>
<span class="normal"><a href="#__codelineno-0-461">461</a></span>
<span class="normal"><a href="#__codelineno-0-462">462</a></span>
<span class="normal"><a href="#__codelineno-0-463">463</a></span>
<span class="normal"><a href="#__codelineno-0-464">464</a></span>
<span class="normal"><a href="#__codelineno-0-465">465</a></span>
<span class="normal"><a href="#__codelineno-0-466">466</a></span>
<span class="normal"><a href="#__codelineno-0-467">467</a></span>
<span class="normal"><a href="#__codelineno-0-468">468</a></span>
<span class="normal"><a href="#__codelineno-0-469">469</a></span>
<span class="normal"><a href="#__codelineno-0-470">470</a></span>
<span class="normal"><a href="#__codelineno-0-471">471</a></span>
<span class="normal"><a href="#__codelineno-0-472">472</a></span>
<span class="normal"><a href="#__codelineno-0-473">473</a></span>
<span class="normal"><a href="#__codelineno-0-474">474</a></span>
<span class="normal"><a href="#__codelineno-0-475">475</a></span>
<span class="normal"><a href="#__codelineno-0-476">476</a></span>
<span class="normal"><a href="#__codelineno-0-477">477</a></span>
<span class="normal"><a href="#__codelineno-0-478">478</a></span>
<span class="normal"><a href="#__codelineno-0-479">479</a></span>
<span class="normal"><a href="#__codelineno-0-480">480</a></span>
<span class="normal"><a href="#__codelineno-0-481">481</a></span>
<span class="normal"><a href="#__codelineno-0-482">482</a></span>
<span class="normal"><a href="#__codelineno-0-483">483</a></span>
<span class="normal"><a href="#__codelineno-0-484">484</a></span>
<span class="normal"><a href="#__codelineno-0-485">485</a></span>
<span class="normal"><a href="#__codelineno-0-486">486</a></span>
<span class="normal"><a href="#__codelineno-0-487">487</a></span>
<span class="normal"><a href="#__codelineno-0-488">488</a></span>
<span class="normal"><a href="#__codelineno-0-489">489</a></span>
<span class="normal"><a href="#__codelineno-0-490">490</a></span>
<span class="normal"><a href="#__codelineno-0-491">491</a></span>
<span class="normal"><a href="#__codelineno-0-492">492</a></span>
<span class="normal"><a href="#__codelineno-0-493">493</a></span>
<span class="normal"><a href="#__codelineno-0-494">494</a></span>
<span class="normal"><a href="#__codelineno-0-495">495</a></span>
<span class="normal"><a href="#__codelineno-0-496">496</a></span>
<span class="normal"><a href="#__codelineno-0-497">497</a></span>
<span class="normal"><a href="#__codelineno-0-498">498</a></span>
<span class="normal"><a href="#__codelineno-0-499">499</a></span>
<span class="normal"><a href="#__codelineno-0-500">500</a></span>
<span class="normal"><a href="#__codelineno-0-501">501</a></span>
<span class="normal"><a href="#__codelineno-0-502">502</a></span>
<span class="normal"><a href="#__codelineno-0-503">503</a></span>
<span class="normal"><a href="#__codelineno-0-504">504</a></span>
<span class="normal"><a href="#__codelineno-0-505">505</a></span>
<span class="normal"><a href="#__codelineno-0-506">506</a></span>
<span class="normal"><a href="#__codelineno-0-507">507</a></span>
<span class="normal"><a href="#__codelineno-0-508">508</a></span>
<span class="normal"><a href="#__codelineno-0-509">509</a></span>
<span class="normal"><a href="#__codelineno-0-510">510</a></span>
<span class="normal"><a href="#__codelineno-0-511">511</a></span>
<span class="normal"><a href="#__codelineno-0-512">512</a></span>
<span class="normal"><a href="#__codelineno-0-513">513</a></span>
<span class="normal"><a href="#__codelineno-0-514">514</a></span>
<span class="normal"><a href="#__codelineno-0-515">515</a></span>
<span class="normal"><a href="#__codelineno-0-516">516</a></span>
<span class="normal"><a href="#__codelineno-0-517">517</a></span>
<span class="normal"><a href="#__codelineno-0-518">518</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-425" name="__codelineno-0-425"></a><span class="nd">@dataclass</span><span class="p">(</span><span class="n">frozen</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">init</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<a id="__codelineno-0-426" name="__codelineno-0-426"></a><span class="k">class</span><span class="w"> </span><span class="nc">MapReader</span><span class="p">(</span><span class="n">Reader</span><span class="p">):</span>
<a id="__codelineno-0-427" name="__codelineno-0-427"></a> <span class="vm">__slots__</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;key&quot;</span><span class="p">,</span> <span class="s2">&quot;value&quot;</span><span class="p">,</span> <span class="s2">&quot;_is_int_int&quot;</span><span class="p">,</span> <span class="s2">&quot;_is_int_bytes&quot;</span><span class="p">,</span> <span class="s2">&quot;_key_reader&quot;</span><span class="p">,</span> <span class="s2">&quot;_value_reader&quot;</span><span class="p">,</span> <span class="s2">&quot;_hash&quot;</span><span class="p">)</span>
<a id="__codelineno-0-428" name="__codelineno-0-428"></a> <span class="n">key</span><span class="p">:</span> <span class="n">Reader</span>
<a id="__codelineno-0-429" name="__codelineno-0-429"></a> <span class="n">value</span><span class="p">:</span> <span class="n">Reader</span>
<a id="__codelineno-0-430" name="__codelineno-0-430"></a>
<a id="__codelineno-0-431" name="__codelineno-0-431"></a> <span class="k">def</span><span class="w"> </span><span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">key</span><span class="p">:</span> <span class="n">Reader</span><span class="p">,</span> <span class="n">value</span><span class="p">:</span> <span class="n">Reader</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<a id="__codelineno-0-432" name="__codelineno-0-432"></a> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">()</span>
<a id="__codelineno-0-433" name="__codelineno-0-433"></a> <span class="bp">self</span><span class="o">.</span><span class="n">key</span> <span class="o">=</span> <span class="n">key</span>
<a id="__codelineno-0-434" name="__codelineno-0-434"></a> <span class="bp">self</span><span class="o">.</span><span class="n">value</span> <span class="o">=</span> <span class="n">value</span>
<a id="__codelineno-0-435" name="__codelineno-0-435"></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">key</span><span class="p">,</span> <span class="n">IntegerReader</span><span class="p">):</span>
<a id="__codelineno-0-436" name="__codelineno-0-436"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_is_int_int</span> <span class="o">=</span> <span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">,</span> <span class="n">IntegerReader</span><span class="p">)</span>
<a id="__codelineno-0-437" name="__codelineno-0-437"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_is_int_bytes</span> <span class="o">=</span> <span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">,</span> <span class="n">BinaryReader</span><span class="p">)</span>
<a id="__codelineno-0-438" name="__codelineno-0-438"></a> <span class="k">else</span><span class="p">:</span>
<a id="__codelineno-0-439" name="__codelineno-0-439"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_is_int_int</span> <span class="o">=</span> <span class="kc">False</span>
<a id="__codelineno-0-440" name="__codelineno-0-440"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_is_int_bytes</span> <span class="o">=</span> <span class="kc">False</span>
<a id="__codelineno-0-441" name="__codelineno-0-441"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_key_reader</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">key</span><span class="o">.</span><span class="n">read</span>
<a id="__codelineno-0-442" name="__codelineno-0-442"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_value_reader</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="o">.</span><span class="n">read</span>
<a id="__codelineno-0-443" name="__codelineno-0-443"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_hash</span> <span class="o">=</span> <span class="nb">hash</span><span class="p">((</span><span class="bp">self</span><span class="o">.</span><span class="n">key</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">))</span>
<a id="__codelineno-0-444" name="__codelineno-0-444"></a>
<a id="__codelineno-0-445" name="__codelineno-0-445"></a> <span class="k">def</span><span class="w"> </span><span class="nf">_read_int_int</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">decoder</span><span class="p">:</span> <span class="n">BinaryDecoder</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Mapping</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">int</span><span class="p">]:</span>
<a id="__codelineno-0-446" name="__codelineno-0-446"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Read a mapping from int to int from the decoder.</span>
<a id="__codelineno-0-447" name="__codelineno-0-447"></a>
<a id="__codelineno-0-448" name="__codelineno-0-448"></a><span class="sd"> Read a map of ints to ints from the decoder, since this is such a common</span>
<a id="__codelineno-0-449" name="__codelineno-0-449"></a><span class="sd"> data type, it is optimized to be faster than the generic map reader, by</span>
<a id="__codelineno-0-450" name="__codelineno-0-450"></a><span class="sd"> using a lazy dict.</span>
<a id="__codelineno-0-451" name="__codelineno-0-451"></a>
<a id="__codelineno-0-452" name="__codelineno-0-452"></a><span class="sd"> The time it takes to create the python dictionary is much larger than</span>
<a id="__codelineno-0-453" name="__codelineno-0-453"></a><span class="sd"> the time it takes to read the data from the decoder as an array, so the</span>
<a id="__codelineno-0-454" name="__codelineno-0-454"></a><span class="sd"> lazy dict defers creating the python dictionary until it is actually</span>
<a id="__codelineno-0-455" name="__codelineno-0-455"></a><span class="sd"> accessed.</span>
<a id="__codelineno-0-456" name="__codelineno-0-456"></a>
<a id="__codelineno-0-457" name="__codelineno-0-457"></a><span class="sd"> &quot;&quot;&quot;</span>
<a id="__codelineno-0-458" name="__codelineno-0-458"></a> <span class="n">block_count</span> <span class="o">=</span> <span class="n">decoder</span><span class="o">.</span><span class="n">read_int</span><span class="p">()</span>
<a id="__codelineno-0-459" name="__codelineno-0-459"></a>
<a id="__codelineno-0-460" name="__codelineno-0-460"></a> <span class="c1"># Often times the map is empty, so we can just return an empty dict without</span>
<a id="__codelineno-0-461" name="__codelineno-0-461"></a> <span class="c1"># instancing the LazyDict</span>
<a id="__codelineno-0-462" name="__codelineno-0-462"></a> <span class="k">if</span> <span class="n">block_count</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
<a id="__codelineno-0-463" name="__codelineno-0-463"></a> <span class="k">return</span> <span class="n">EMPTY_DICT</span>
<a id="__codelineno-0-464" name="__codelineno-0-464"></a>
<a id="__codelineno-0-465" name="__codelineno-0-465"></a> <span class="n">contents_array</span><span class="p">:</span> <span class="n">List</span><span class="p">[</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="o">...</span><span class="p">]]</span> <span class="o">=</span> <span class="p">[]</span>
<a id="__codelineno-0-466" name="__codelineno-0-466"></a>
<a id="__codelineno-0-467" name="__codelineno-0-467"></a> <span class="k">while</span> <span class="n">block_count</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">:</span>
<a id="__codelineno-0-468" name="__codelineno-0-468"></a> <span class="k">if</span> <span class="n">block_count</span> <span class="o">&lt;</span> <span class="mi">0</span><span class="p">:</span>
<a id="__codelineno-0-469" name="__codelineno-0-469"></a> <span class="n">block_count</span> <span class="o">=</span> <span class="o">-</span><span class="n">block_count</span>
<a id="__codelineno-0-470" name="__codelineno-0-470"></a> <span class="c1"># We ignore the block size for now</span>
<a id="__codelineno-0-471" name="__codelineno-0-471"></a> <span class="n">decoder</span><span class="o">.</span><span class="n">skip_int</span><span class="p">()</span>
<a id="__codelineno-0-472" name="__codelineno-0-472"></a>
<a id="__codelineno-0-473" name="__codelineno-0-473"></a> <span class="c1"># Since the integers are encoding right next to each other</span>
<a id="__codelineno-0-474" name="__codelineno-0-474"></a> <span class="c1"># just read them all at once.</span>
<a id="__codelineno-0-475" name="__codelineno-0-475"></a> <span class="n">contents_array</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">decoder</span><span class="o">.</span><span class="n">read_ints</span><span class="p">(</span><span class="n">block_count</span> <span class="o">*</span> <span class="mi">2</span><span class="p">))</span>
<a id="__codelineno-0-476" name="__codelineno-0-476"></a> <span class="n">block_count</span> <span class="o">=</span> <span class="n">decoder</span><span class="o">.</span><span class="n">read_int</span><span class="p">()</span>
<a id="__codelineno-0-477" name="__codelineno-0-477"></a>
<a id="__codelineno-0-478" name="__codelineno-0-478"></a> <span class="k">return</span> <span class="n">LazyDict</span><span class="p">(</span><span class="n">contents_array</span><span class="p">)</span>
<a id="__codelineno-0-479" name="__codelineno-0-479"></a>
<a id="__codelineno-0-480" name="__codelineno-0-480"></a> <span class="k">def</span><span class="w"> </span><span class="nf">read</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">decoder</span><span class="p">:</span> <span class="n">BinaryDecoder</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Mapping</span><span class="p">[</span><span class="n">Any</span><span class="p">,</span> <span class="n">Any</span><span class="p">]:</span>
<a id="__codelineno-0-481" name="__codelineno-0-481"></a> <span class="n">read_items</span><span class="p">:</span> <span class="nb">dict</span><span class="p">[</span><span class="n">Any</span><span class="p">,</span> <span class="n">Any</span><span class="p">]</span> <span class="o">=</span> <span class="p">{}</span>
<a id="__codelineno-0-482" name="__codelineno-0-482"></a>
<a id="__codelineno-0-483" name="__codelineno-0-483"></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_is_int_int</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">_is_int_bytes</span><span class="p">:</span>
<a id="__codelineno-0-484" name="__codelineno-0-484"></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_is_int_int</span><span class="p">:</span>
<a id="__codelineno-0-485" name="__codelineno-0-485"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_read_int_int</span><span class="p">(</span><span class="n">decoder</span><span class="p">)</span>
<a id="__codelineno-0-486" name="__codelineno-0-486"></a>
<a id="__codelineno-0-487" name="__codelineno-0-487"></a> <span class="n">block_count</span> <span class="o">=</span> <span class="n">decoder</span><span class="o">.</span><span class="n">read_int</span><span class="p">()</span>
<a id="__codelineno-0-488" name="__codelineno-0-488"></a> <span class="k">while</span> <span class="n">block_count</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">:</span>
<a id="__codelineno-0-489" name="__codelineno-0-489"></a> <span class="k">if</span> <span class="n">block_count</span> <span class="o">&lt;</span> <span class="mi">0</span><span class="p">:</span>
<a id="__codelineno-0-490" name="__codelineno-0-490"></a> <span class="n">block_count</span> <span class="o">=</span> <span class="o">-</span><span class="n">block_count</span>
<a id="__codelineno-0-491" name="__codelineno-0-491"></a> <span class="c1"># We ignore the block size for now</span>
<a id="__codelineno-0-492" name="__codelineno-0-492"></a> <span class="n">_</span> <span class="o">=</span> <span class="n">decoder</span><span class="o">.</span><span class="n">read_int</span><span class="p">()</span>
<a id="__codelineno-0-493" name="__codelineno-0-493"></a> <span class="n">decoder</span><span class="o">.</span><span class="n">read_int_bytes_dict</span><span class="p">(</span><span class="n">block_count</span><span class="p">,</span> <span class="n">read_items</span><span class="p">)</span>
<a id="__codelineno-0-494" name="__codelineno-0-494"></a> <span class="n">block_count</span> <span class="o">=</span> <span class="n">decoder</span><span class="o">.</span><span class="n">read_int</span><span class="p">()</span>
<a id="__codelineno-0-495" name="__codelineno-0-495"></a> <span class="k">else</span><span class="p">:</span>
<a id="__codelineno-0-496" name="__codelineno-0-496"></a> <span class="n">block_count</span> <span class="o">=</span> <span class="n">decoder</span><span class="o">.</span><span class="n">read_int</span><span class="p">()</span>
<a id="__codelineno-0-497" name="__codelineno-0-497"></a> <span class="k">while</span> <span class="n">block_count</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">:</span>
<a id="__codelineno-0-498" name="__codelineno-0-498"></a> <span class="k">if</span> <span class="n">block_count</span> <span class="o">&lt;</span> <span class="mi">0</span><span class="p">:</span>
<a id="__codelineno-0-499" name="__codelineno-0-499"></a> <span class="n">block_count</span> <span class="o">=</span> <span class="o">-</span><span class="n">block_count</span>
<a id="__codelineno-0-500" name="__codelineno-0-500"></a> <span class="c1"># We ignore the block size for now</span>
<a id="__codelineno-0-501" name="__codelineno-0-501"></a> <span class="n">_</span> <span class="o">=</span> <span class="n">decoder</span><span class="o">.</span><span class="n">read_int</span><span class="p">()</span>
<a id="__codelineno-0-502" name="__codelineno-0-502"></a> <span class="k">for</span> <span class="n">_</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">block_count</span><span class="p">):</span>
<a id="__codelineno-0-503" name="__codelineno-0-503"></a> <span class="n">key</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_key_reader</span><span class="p">(</span><span class="n">decoder</span><span class="p">)</span>
<a id="__codelineno-0-504" name="__codelineno-0-504"></a> <span class="n">read_items</span><span class="p">[</span><span class="n">key</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_value_reader</span><span class="p">(</span><span class="n">decoder</span><span class="p">)</span>
<a id="__codelineno-0-505" name="__codelineno-0-505"></a> <span class="n">block_count</span> <span class="o">=</span> <span class="n">decoder</span><span class="o">.</span><span class="n">read_int</span><span class="p">()</span>
<a id="__codelineno-0-506" name="__codelineno-0-506"></a>
<a id="__codelineno-0-507" name="__codelineno-0-507"></a> <span class="k">return</span> <span class="n">read_items</span>
<a id="__codelineno-0-508" name="__codelineno-0-508"></a>
<a id="__codelineno-0-509" name="__codelineno-0-509"></a> <span class="k">def</span><span class="w"> </span><span class="nf">skip</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">decoder</span><span class="p">:</span> <span class="n">BinaryDecoder</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<a id="__codelineno-0-510" name="__codelineno-0-510"></a> <span class="k">def</span><span class="w"> </span><span class="nf">skip</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<a id="__codelineno-0-511" name="__codelineno-0-511"></a> <span class="bp">self</span><span class="o">.</span><span class="n">key</span><span class="o">.</span><span class="n">skip</span><span class="p">(</span><span class="n">decoder</span><span class="p">)</span>
<a id="__codelineno-0-512" name="__codelineno-0-512"></a> <span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="o">.</span><span class="n">skip</span><span class="p">(</span><span class="n">decoder</span><span class="p">)</span>
<a id="__codelineno-0-513" name="__codelineno-0-513"></a>
<a id="__codelineno-0-514" name="__codelineno-0-514"></a> <span class="n">_skip_map_array</span><span class="p">(</span><span class="n">decoder</span><span class="p">,</span> <span class="n">skip</span><span class="p">)</span>
<a id="__codelineno-0-515" name="__codelineno-0-515"></a>
<a id="__codelineno-0-516" name="__codelineno-0-516"></a> <span class="k">def</span><span class="w"> </span><span class="fm">__hash__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">int</span><span class="p">:</span>
<a id="__codelineno-0-517" name="__codelineno-0-517"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Return a hashed representation of the MapReader class.&quot;&quot;&quot;</span>
<a id="__codelineno-0-518" name="__codelineno-0-518"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_hash</span>
</code></pre></div></td></tr></table></div>
</details>
<div class="doc doc-children">
<div class="doc doc-object doc-function">
<h3 id="pyiceberg.avro.reader.MapReader.__hash__" class="doc doc-heading">
<code class="highlight language-python"><span class="fm">__hash__</span><span class="p">()</span></code>
<a href="#pyiceberg.avro.reader.MapReader.__hash__" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="doc doc-contents ">
<p>Return a hashed representation of the MapReader class.</p>
<details class="quote">
<summary>Source code in <code>pyiceberg/avro/reader.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-516">516</a></span>
<span class="normal"><a href="#__codelineno-0-517">517</a></span>
<span class="normal"><a href="#__codelineno-0-518">518</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-516" name="__codelineno-0-516"></a><span class="k">def</span><span class="w"> </span><span class="fm">__hash__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">int</span><span class="p">:</span>
<a id="__codelineno-0-517" name="__codelineno-0-517"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Return a hashed representation of the MapReader class.&quot;&quot;&quot;</span>
<a id="__codelineno-0-518" name="__codelineno-0-518"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_hash</span>
</code></pre></div></td></tr></table></div>
</details>
</div>
</div>
</div>
</div>
</div>
<div class="doc doc-object doc-class">
<h2 id="pyiceberg.avro.reader.Reader" class="doc doc-heading">
<code>Reader</code>
<a href="#pyiceberg.avro.reader.Reader" class="headerlink" title="Permanent link">&para;</a></h2>
<div class="doc doc-contents ">
<p class="doc doc-class-bases">
Bases: <code><a class="autorefs autorefs-internal" title="Singleton (pyiceberg.utils.singleton.Singleton)" href="../../utils/singleton/#pyiceberg.utils.singleton.Singleton">Singleton</a></code></p>
<details class="quote">
<summary>Source code in <code>pyiceberg/avro/reader.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-87">87</a></span>
<span class="normal"><a href="#__codelineno-0-88">88</a></span>
<span class="normal"><a href="#__codelineno-0-89">89</a></span>
<span class="normal"><a href="#__codelineno-0-90">90</a></span>
<span class="normal"><a href="#__codelineno-0-91">91</a></span>
<span class="normal"><a href="#__codelineno-0-92">92</a></span>
<span class="normal"><a href="#__codelineno-0-93">93</a></span>
<span class="normal"><a href="#__codelineno-0-94">94</a></span>
<span class="normal"><a href="#__codelineno-0-95">95</a></span>
<span class="normal"><a href="#__codelineno-0-96">96</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-87" name="__codelineno-0-87"></a><span class="k">class</span><span class="w"> </span><span class="nc">Reader</span><span class="p">(</span><span class="n">Singleton</span><span class="p">):</span>
<a id="__codelineno-0-88" name="__codelineno-0-88"></a> <span class="nd">@abstractmethod</span>
<a id="__codelineno-0-89" name="__codelineno-0-89"></a> <span class="k">def</span><span class="w"> </span><span class="nf">read</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">decoder</span><span class="p">:</span> <span class="n">BinaryDecoder</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Any</span><span class="p">:</span> <span class="o">...</span>
<a id="__codelineno-0-90" name="__codelineno-0-90"></a>
<a id="__codelineno-0-91" name="__codelineno-0-91"></a> <span class="nd">@abstractmethod</span>
<a id="__codelineno-0-92" name="__codelineno-0-92"></a> <span class="k">def</span><span class="w"> </span><span class="nf">skip</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">decoder</span><span class="p">:</span> <span class="n">BinaryDecoder</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span> <span class="o">...</span>
<a id="__codelineno-0-93" name="__codelineno-0-93"></a>
<a id="__codelineno-0-94" name="__codelineno-0-94"></a> <span class="k">def</span><span class="w"> </span><span class="fm">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<a id="__codelineno-0-95" name="__codelineno-0-95"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Return the string representation of the Reader class.&quot;&quot;&quot;</span>
<a id="__codelineno-0-96" name="__codelineno-0-96"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__name__</span><span class="si">}</span><span class="s2">()&quot;</span>
</code></pre></div></td></tr></table></div>
</details>
<div class="doc doc-children">
<div class="doc doc-object doc-function">
<h3 id="pyiceberg.avro.reader.Reader.__repr__" class="doc doc-heading">
<code class="highlight language-python"><span class="fm">__repr__</span><span class="p">()</span></code>
<a href="#pyiceberg.avro.reader.Reader.__repr__" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="doc doc-contents ">
<p>Return the string representation of the Reader class.</p>
<details class="quote">
<summary>Source code in <code>pyiceberg/avro/reader.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-94">94</a></span>
<span class="normal"><a href="#__codelineno-0-95">95</a></span>
<span class="normal"><a href="#__codelineno-0-96">96</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-94" name="__codelineno-0-94"></a><span class="k">def</span><span class="w"> </span><span class="fm">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<a id="__codelineno-0-95" name="__codelineno-0-95"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Return the string representation of the Reader class.&quot;&quot;&quot;</span>
<a id="__codelineno-0-96" name="__codelineno-0-96"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__name__</span><span class="si">}</span><span class="s2">()&quot;</span>
</code></pre></div></td></tr></table></div>
</details>
</div>
</div>
</div>
</div>
</div>
<div class="doc doc-object doc-class">
<h2 id="pyiceberg.avro.reader.StructReader" class="doc doc-heading">
<code>StructReader</code>
<a href="#pyiceberg.avro.reader.StructReader" class="headerlink" title="Permanent link">&para;</a></h2>
<div class="doc doc-contents ">
<p class="doc doc-class-bases">
Bases: <code><a class="autorefs autorefs-internal" title="Reader (pyiceberg.avro.reader.Reader)" href="#pyiceberg.avro.reader.Reader">Reader</a></code></p>
<details class="quote">
<summary>Source code in <code>pyiceberg/avro/reader.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-314">314</a></span>
<span class="normal"><a href="#__codelineno-0-315">315</a></span>
<span class="normal"><a href="#__codelineno-0-316">316</a></span>
<span class="normal"><a href="#__codelineno-0-317">317</a></span>
<span class="normal"><a href="#__codelineno-0-318">318</a></span>
<span class="normal"><a href="#__codelineno-0-319">319</a></span>
<span class="normal"><a href="#__codelineno-0-320">320</a></span>
<span class="normal"><a href="#__codelineno-0-321">321</a></span>
<span class="normal"><a href="#__codelineno-0-322">322</a></span>
<span class="normal"><a href="#__codelineno-0-323">323</a></span>
<span class="normal"><a href="#__codelineno-0-324">324</a></span>
<span class="normal"><a href="#__codelineno-0-325">325</a></span>
<span class="normal"><a href="#__codelineno-0-326">326</a></span>
<span class="normal"><a href="#__codelineno-0-327">327</a></span>
<span class="normal"><a href="#__codelineno-0-328">328</a></span>
<span class="normal"><a href="#__codelineno-0-329">329</a></span>
<span class="normal"><a href="#__codelineno-0-330">330</a></span>
<span class="normal"><a href="#__codelineno-0-331">331</a></span>
<span class="normal"><a href="#__codelineno-0-332">332</a></span>
<span class="normal"><a href="#__codelineno-0-333">333</a></span>
<span class="normal"><a href="#__codelineno-0-334">334</a></span>
<span class="normal"><a href="#__codelineno-0-335">335</a></span>
<span class="normal"><a href="#__codelineno-0-336">336</a></span>
<span class="normal"><a href="#__codelineno-0-337">337</a></span>
<span class="normal"><a href="#__codelineno-0-338">338</a></span>
<span class="normal"><a href="#__codelineno-0-339">339</a></span>
<span class="normal"><a href="#__codelineno-0-340">340</a></span>
<span class="normal"><a href="#__codelineno-0-341">341</a></span>
<span class="normal"><a href="#__codelineno-0-342">342</a></span>
<span class="normal"><a href="#__codelineno-0-343">343</a></span>
<span class="normal"><a href="#__codelineno-0-344">344</a></span>
<span class="normal"><a href="#__codelineno-0-345">345</a></span>
<span class="normal"><a href="#__codelineno-0-346">346</a></span>
<span class="normal"><a href="#__codelineno-0-347">347</a></span>
<span class="normal"><a href="#__codelineno-0-348">348</a></span>
<span class="normal"><a href="#__codelineno-0-349">349</a></span>
<span class="normal"><a href="#__codelineno-0-350">350</a></span>
<span class="normal"><a href="#__codelineno-0-351">351</a></span>
<span class="normal"><a href="#__codelineno-0-352">352</a></span>
<span class="normal"><a href="#__codelineno-0-353">353</a></span>
<span class="normal"><a href="#__codelineno-0-354">354</a></span>
<span class="normal"><a href="#__codelineno-0-355">355</a></span>
<span class="normal"><a href="#__codelineno-0-356">356</a></span>
<span class="normal"><a href="#__codelineno-0-357">357</a></span>
<span class="normal"><a href="#__codelineno-0-358">358</a></span>
<span class="normal"><a href="#__codelineno-0-359">359</a></span>
<span class="normal"><a href="#__codelineno-0-360">360</a></span>
<span class="normal"><a href="#__codelineno-0-361">361</a></span>
<span class="normal"><a href="#__codelineno-0-362">362</a></span>
<span class="normal"><a href="#__codelineno-0-363">363</a></span>
<span class="normal"><a href="#__codelineno-0-364">364</a></span>
<span class="normal"><a href="#__codelineno-0-365">365</a></span>
<span class="normal"><a href="#__codelineno-0-366">366</a></span>
<span class="normal"><a href="#__codelineno-0-367">367</a></span>
<span class="normal"><a href="#__codelineno-0-368">368</a></span>
<span class="normal"><a href="#__codelineno-0-369">369</a></span>
<span class="normal"><a href="#__codelineno-0-370">370</a></span>
<span class="normal"><a href="#__codelineno-0-371">371</a></span>
<span class="normal"><a href="#__codelineno-0-372">372</a></span>
<span class="normal"><a href="#__codelineno-0-373">373</a></span>
<span class="normal"><a href="#__codelineno-0-374">374</a></span>
<span class="normal"><a href="#__codelineno-0-375">375</a></span>
<span class="normal"><a href="#__codelineno-0-376">376</a></span>
<span class="normal"><a href="#__codelineno-0-377">377</a></span>
<span class="normal"><a href="#__codelineno-0-378">378</a></span>
<span class="normal"><a href="#__codelineno-0-379">379</a></span>
<span class="normal"><a href="#__codelineno-0-380">380</a></span>
<span class="normal"><a href="#__codelineno-0-381">381</a></span>
<span class="normal"><a href="#__codelineno-0-382">382</a></span>
<span class="normal"><a href="#__codelineno-0-383">383</a></span>
<span class="normal"><a href="#__codelineno-0-384">384</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-314" name="__codelineno-0-314"></a><span class="k">class</span><span class="w"> </span><span class="nc">StructReader</span><span class="p">(</span><span class="n">Reader</span><span class="p">):</span>
<a id="__codelineno-0-315" name="__codelineno-0-315"></a> <span class="vm">__slots__</span> <span class="o">=</span> <span class="p">(</span>
<a id="__codelineno-0-316" name="__codelineno-0-316"></a> <span class="s2">&quot;field_readers&quot;</span><span class="p">,</span>
<a id="__codelineno-0-317" name="__codelineno-0-317"></a> <span class="s2">&quot;create_struct&quot;</span><span class="p">,</span>
<a id="__codelineno-0-318" name="__codelineno-0-318"></a> <span class="s2">&quot;struct&quot;</span><span class="p">,</span>
<a id="__codelineno-0-319" name="__codelineno-0-319"></a> <span class="s2">&quot;_field_reader_functions&quot;</span><span class="p">,</span>
<a id="__codelineno-0-320" name="__codelineno-0-320"></a> <span class="s2">&quot;_hash&quot;</span><span class="p">,</span>
<a id="__codelineno-0-321" name="__codelineno-0-321"></a> <span class="s2">&quot;_max_pos&quot;</span><span class="p">,</span>
<a id="__codelineno-0-322" name="__codelineno-0-322"></a> <span class="p">)</span>
<a id="__codelineno-0-323" name="__codelineno-0-323"></a> <span class="n">field_readers</span><span class="p">:</span> <span class="n">Tuple</span><span class="p">[</span><span class="n">Tuple</span><span class="p">[</span><span class="n">Optional</span><span class="p">[</span><span class="nb">int</span><span class="p">],</span> <span class="n">Reader</span><span class="p">],</span> <span class="o">...</span><span class="p">]</span>
<a id="__codelineno-0-324" name="__codelineno-0-324"></a> <span class="n">create_struct</span><span class="p">:</span> <span class="n">Callable</span><span class="p">[</span><span class="o">...</span><span class="p">,</span> <span class="n">StructProtocol</span><span class="p">]</span>
<a id="__codelineno-0-325" name="__codelineno-0-325"></a> <span class="n">struct</span><span class="p">:</span> <span class="n">StructType</span>
<a id="__codelineno-0-326" name="__codelineno-0-326"></a> <span class="n">field_reader_functions</span> <span class="o">=</span> <span class="n">Tuple</span><span class="p">[</span><span class="n">Tuple</span><span class="p">[</span><span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">],</span> <span class="nb">int</span><span class="p">,</span> <span class="n">Optional</span><span class="p">[</span><span class="n">Callable</span><span class="p">[[</span><span class="n">BinaryDecoder</span><span class="p">],</span> <span class="n">Any</span><span class="p">]]],</span> <span class="o">...</span><span class="p">]</span>
<a id="__codelineno-0-327" name="__codelineno-0-327"></a>
<a id="__codelineno-0-328" name="__codelineno-0-328"></a> <span class="k">def</span><span class="w"> </span><span class="fm">__init__</span><span class="p">(</span>
<a id="__codelineno-0-329" name="__codelineno-0-329"></a> <span class="bp">self</span><span class="p">,</span>
<a id="__codelineno-0-330" name="__codelineno-0-330"></a> <span class="n">field_readers</span><span class="p">:</span> <span class="n">Tuple</span><span class="p">[</span><span class="n">Tuple</span><span class="p">[</span><span class="n">Optional</span><span class="p">[</span><span class="nb">int</span><span class="p">],</span> <span class="n">Reader</span><span class="p">],</span> <span class="o">...</span><span class="p">],</span>
<a id="__codelineno-0-331" name="__codelineno-0-331"></a> <span class="n">create_struct</span><span class="p">:</span> <span class="n">Callable</span><span class="p">[</span><span class="o">...</span><span class="p">,</span> <span class="n">StructProtocol</span><span class="p">],</span>
<a id="__codelineno-0-332" name="__codelineno-0-332"></a> <span class="n">struct</span><span class="p">:</span> <span class="n">StructType</span><span class="p">,</span>
<a id="__codelineno-0-333" name="__codelineno-0-333"></a> <span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<a id="__codelineno-0-334" name="__codelineno-0-334"></a> <span class="bp">self</span><span class="o">.</span><span class="n">field_readers</span> <span class="o">=</span> <span class="n">field_readers</span>
<a id="__codelineno-0-335" name="__codelineno-0-335"></a> <span class="bp">self</span><span class="o">.</span><span class="n">create_struct</span> <span class="o">=</span> <span class="n">create_struct</span>
<a id="__codelineno-0-336" name="__codelineno-0-336"></a> <span class="c1"># TODO: Implement struct-reuse</span>
<a id="__codelineno-0-337" name="__codelineno-0-337"></a> <span class="bp">self</span><span class="o">.</span><span class="n">struct</span> <span class="o">=</span> <span class="n">struct</span>
<a id="__codelineno-0-338" name="__codelineno-0-338"></a>
<a id="__codelineno-0-339" name="__codelineno-0-339"></a> <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">create_struct</span><span class="p">(),</span> <span class="n">StructProtocol</span><span class="p">):</span>
<a id="__codelineno-0-340" name="__codelineno-0-340"></a> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Incompatible with StructProtocol: </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">create_struct</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<a id="__codelineno-0-341" name="__codelineno-0-341"></a>
<a id="__codelineno-0-342" name="__codelineno-0-342"></a> <span class="n">reading_callbacks</span><span class="p">:</span> <span class="n">List</span><span class="p">[</span><span class="n">Tuple</span><span class="p">[</span><span class="n">Optional</span><span class="p">[</span><span class="nb">int</span><span class="p">],</span> <span class="n">Callable</span><span class="p">[[</span><span class="n">BinaryDecoder</span><span class="p">],</span> <span class="n">Any</span><span class="p">]]]</span> <span class="o">=</span> <span class="p">[]</span>
<a id="__codelineno-0-343" name="__codelineno-0-343"></a> <span class="n">max_pos</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span>
<a id="__codelineno-0-344" name="__codelineno-0-344"></a> <span class="k">for</span> <span class="n">pos</span><span class="p">,</span> <span class="n">field</span> <span class="ow">in</span> <span class="n">field_readers</span><span class="p">:</span>
<a id="__codelineno-0-345" name="__codelineno-0-345"></a> <span class="k">if</span> <span class="n">pos</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<a id="__codelineno-0-346" name="__codelineno-0-346"></a> <span class="n">reading_callbacks</span><span class="o">.</span><span class="n">append</span><span class="p">((</span><span class="n">pos</span><span class="p">,</span> <span class="n">field</span><span class="o">.</span><span class="n">read</span><span class="p">))</span>
<a id="__codelineno-0-347" name="__codelineno-0-347"></a> <span class="n">max_pos</span> <span class="o">=</span> <span class="nb">max</span><span class="p">(</span><span class="n">max_pos</span><span class="p">,</span> <span class="n">pos</span><span class="p">)</span>
<a id="__codelineno-0-348" name="__codelineno-0-348"></a> <span class="k">else</span><span class="p">:</span>
<a id="__codelineno-0-349" name="__codelineno-0-349"></a> <span class="n">reading_callbacks</span><span class="o">.</span><span class="n">append</span><span class="p">((</span><span class="kc">None</span><span class="p">,</span> <span class="n">field</span><span class="o">.</span><span class="n">skip</span><span class="p">))</span>
<a id="__codelineno-0-350" name="__codelineno-0-350"></a>
<a id="__codelineno-0-351" name="__codelineno-0-351"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_field_reader_functions</span> <span class="o">=</span> <span class="nb">tuple</span><span class="p">(</span><span class="n">reading_callbacks</span><span class="p">)</span>
<a id="__codelineno-0-352" name="__codelineno-0-352"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_hash</span> <span class="o">=</span> <span class="nb">hash</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_field_reader_functions</span><span class="p">)</span>
<a id="__codelineno-0-353" name="__codelineno-0-353"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_max_pos</span> <span class="o">=</span> <span class="mi">1</span> <span class="o">+</span> <span class="n">max_pos</span>
<a id="__codelineno-0-354" name="__codelineno-0-354"></a>
<a id="__codelineno-0-355" name="__codelineno-0-355"></a> <span class="k">def</span><span class="w"> </span><span class="nf">read</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">decoder</span><span class="p">:</span> <span class="n">BinaryDecoder</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">StructProtocol</span><span class="p">:</span>
<a id="__codelineno-0-356" name="__codelineno-0-356"></a> <span class="c1"># TODO: Implement struct-reuse</span>
<a id="__codelineno-0-357" name="__codelineno-0-357"></a> <span class="n">struct</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">create_struct</span><span class="p">(</span><span class="o">*</span><span class="p">[</span><span class="kc">None</span><span class="p">]</span> <span class="o">*</span> <span class="bp">self</span><span class="o">.</span><span class="n">_max_pos</span><span class="p">)</span>
<a id="__codelineno-0-358" name="__codelineno-0-358"></a> <span class="k">for</span> <span class="n">pos</span><span class="p">,</span> <span class="n">field_reader</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_field_reader_functions</span><span class="p">:</span>
<a id="__codelineno-0-359" name="__codelineno-0-359"></a> <span class="k">if</span> <span class="n">pos</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<a id="__codelineno-0-360" name="__codelineno-0-360"></a> <span class="n">struct</span><span class="p">[</span><span class="n">pos</span><span class="p">]</span> <span class="o">=</span> <span class="n">field_reader</span><span class="p">(</span><span class="n">decoder</span><span class="p">)</span> <span class="c1"># later: pass reuse in here</span>
<a id="__codelineno-0-361" name="__codelineno-0-361"></a> <span class="k">else</span><span class="p">:</span>
<a id="__codelineno-0-362" name="__codelineno-0-362"></a> <span class="n">field_reader</span><span class="p">(</span><span class="n">decoder</span><span class="p">)</span>
<a id="__codelineno-0-363" name="__codelineno-0-363"></a>
<a id="__codelineno-0-364" name="__codelineno-0-364"></a> <span class="k">return</span> <span class="n">struct</span>
<a id="__codelineno-0-365" name="__codelineno-0-365"></a>
<a id="__codelineno-0-366" name="__codelineno-0-366"></a> <span class="k">def</span><span class="w"> </span><span class="nf">skip</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">decoder</span><span class="p">:</span> <span class="n">BinaryDecoder</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<a id="__codelineno-0-367" name="__codelineno-0-367"></a> <span class="k">for</span> <span class="n">_</span><span class="p">,</span> <span class="n">field</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">field_readers</span><span class="p">:</span>
<a id="__codelineno-0-368" name="__codelineno-0-368"></a> <span class="n">field</span><span class="o">.</span><span class="n">skip</span><span class="p">(</span><span class="n">decoder</span><span class="p">)</span>
<a id="__codelineno-0-369" name="__codelineno-0-369"></a>
<a id="__codelineno-0-370" name="__codelineno-0-370"></a> <span class="k">def</span><span class="w"> </span><span class="fm">__eq__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">:</span> <span class="n">Any</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span>
<a id="__codelineno-0-371" name="__codelineno-0-371"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Return the equality of two instances of the StructReader class.&quot;&quot;&quot;</span>
<a id="__codelineno-0-372" name="__codelineno-0-372"></a> <span class="k">return</span> <span class="p">(</span>
<a id="__codelineno-0-373" name="__codelineno-0-373"></a> <span class="bp">self</span><span class="o">.</span><span class="n">field_readers</span> <span class="o">==</span> <span class="n">other</span><span class="o">.</span><span class="n">field_readers</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">create_struct</span> <span class="o">==</span> <span class="n">other</span><span class="o">.</span><span class="n">create_struct</span>
<a id="__codelineno-0-374" name="__codelineno-0-374"></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">other</span><span class="p">,</span> <span class="n">StructReader</span><span class="p">)</span>
<a id="__codelineno-0-375" name="__codelineno-0-375"></a> <span class="k">else</span> <span class="kc">False</span>
<a id="__codelineno-0-376" name="__codelineno-0-376"></a> <span class="p">)</span>
<a id="__codelineno-0-377" name="__codelineno-0-377"></a>
<a id="__codelineno-0-378" name="__codelineno-0-378"></a> <span class="k">def</span><span class="w"> </span><span class="fm">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<a id="__codelineno-0-379" name="__codelineno-0-379"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Return the string representation of the StructReader class.&quot;&quot;&quot;</span>
<a id="__codelineno-0-380" name="__codelineno-0-380"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;StructReader((</span><span class="si">{</span><span class="s1">&#39;,&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="nb">repr</span><span class="p">(</span><span class="n">field</span><span class="p">)</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">field</span><span class="w"> </span><span class="ow">in</span><span class="w"> </span><span class="bp">self</span><span class="o">.</span><span class="n">field_readers</span><span class="p">)</span><span class="si">}</span><span class="s2">), </span><span class="si">{</span><span class="nb">repr</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">create_struct</span><span class="p">)</span><span class="si">}</span><span class="s2">)&quot;</span>
<a id="__codelineno-0-381" name="__codelineno-0-381"></a>
<a id="__codelineno-0-382" name="__codelineno-0-382"></a> <span class="k">def</span><span class="w"> </span><span class="fm">__hash__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">int</span><span class="p">:</span>
<a id="__codelineno-0-383" name="__codelineno-0-383"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Return a hashed representation of the StructReader class.&quot;&quot;&quot;</span>
<a id="__codelineno-0-384" name="__codelineno-0-384"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_hash</span>
</code></pre></div></td></tr></table></div>
</details>
<div class="doc doc-children">
<div class="doc doc-object doc-function">
<h3 id="pyiceberg.avro.reader.StructReader.__eq__" class="doc doc-heading">
<code class="highlight language-python"><span class="fm">__eq__</span><span class="p">(</span><span class="n">other</span><span class="p">)</span></code>
<a href="#pyiceberg.avro.reader.StructReader.__eq__" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="doc doc-contents ">
<p>Return the equality of two instances of the StructReader class.</p>
<details class="quote">
<summary>Source code in <code>pyiceberg/avro/reader.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-370">370</a></span>
<span class="normal"><a href="#__codelineno-0-371">371</a></span>
<span class="normal"><a href="#__codelineno-0-372">372</a></span>
<span class="normal"><a href="#__codelineno-0-373">373</a></span>
<span class="normal"><a href="#__codelineno-0-374">374</a></span>
<span class="normal"><a href="#__codelineno-0-375">375</a></span>
<span class="normal"><a href="#__codelineno-0-376">376</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-370" name="__codelineno-0-370"></a><span class="k">def</span><span class="w"> </span><span class="fm">__eq__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">:</span> <span class="n">Any</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span>
<a id="__codelineno-0-371" name="__codelineno-0-371"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Return the equality of two instances of the StructReader class.&quot;&quot;&quot;</span>
<a id="__codelineno-0-372" name="__codelineno-0-372"></a> <span class="k">return</span> <span class="p">(</span>
<a id="__codelineno-0-373" name="__codelineno-0-373"></a> <span class="bp">self</span><span class="o">.</span><span class="n">field_readers</span> <span class="o">==</span> <span class="n">other</span><span class="o">.</span><span class="n">field_readers</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">create_struct</span> <span class="o">==</span> <span class="n">other</span><span class="o">.</span><span class="n">create_struct</span>
<a id="__codelineno-0-374" name="__codelineno-0-374"></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">other</span><span class="p">,</span> <span class="n">StructReader</span><span class="p">)</span>
<a id="__codelineno-0-375" name="__codelineno-0-375"></a> <span class="k">else</span> <span class="kc">False</span>
<a id="__codelineno-0-376" name="__codelineno-0-376"></a> <span class="p">)</span>
</code></pre></div></td></tr></table></div>
</details>
</div>
</div>
<div class="doc doc-object doc-function">
<h3 id="pyiceberg.avro.reader.StructReader.__hash__" class="doc doc-heading">
<code class="highlight language-python"><span class="fm">__hash__</span><span class="p">()</span></code>
<a href="#pyiceberg.avro.reader.StructReader.__hash__" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="doc doc-contents ">
<p>Return a hashed representation of the StructReader class.</p>
<details class="quote">
<summary>Source code in <code>pyiceberg/avro/reader.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-382">382</a></span>
<span class="normal"><a href="#__codelineno-0-383">383</a></span>
<span class="normal"><a href="#__codelineno-0-384">384</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-382" name="__codelineno-0-382"></a><span class="k">def</span><span class="w"> </span><span class="fm">__hash__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">int</span><span class="p">:</span>
<a id="__codelineno-0-383" name="__codelineno-0-383"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Return a hashed representation of the StructReader class.&quot;&quot;&quot;</span>
<a id="__codelineno-0-384" name="__codelineno-0-384"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_hash</span>
</code></pre></div></td></tr></table></div>
</details>
</div>
</div>
<div class="doc doc-object doc-function">
<h3 id="pyiceberg.avro.reader.StructReader.__repr__" class="doc doc-heading">
<code class="highlight language-python"><span class="fm">__repr__</span><span class="p">()</span></code>
<a href="#pyiceberg.avro.reader.StructReader.__repr__" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="doc doc-contents ">
<p>Return the string representation of the StructReader class.</p>
<details class="quote">
<summary>Source code in <code>pyiceberg/avro/reader.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-378">378</a></span>
<span class="normal"><a href="#__codelineno-0-379">379</a></span>
<span class="normal"><a href="#__codelineno-0-380">380</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-378" name="__codelineno-0-378"></a><span class="k">def</span><span class="w"> </span><span class="fm">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<a id="__codelineno-0-379" name="__codelineno-0-379"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Return the string representation of the StructReader class.&quot;&quot;&quot;</span>
<a id="__codelineno-0-380" name="__codelineno-0-380"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;StructReader((</span><span class="si">{</span><span class="s1">&#39;,&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="nb">repr</span><span class="p">(</span><span class="n">field</span><span class="p">)</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">field</span><span class="w"> </span><span class="ow">in</span><span class="w"> </span><span class="bp">self</span><span class="o">.</span><span class="n">field_readers</span><span class="p">)</span><span class="si">}</span><span class="s2">), </span><span class="si">{</span><span class="nb">repr</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">create_struct</span><span class="p">)</span><span class="si">}</span><span class="s2">)&quot;</span>
</code></pre></div></td></tr></table></div>
</details>
</div>
</div>
</div>
</div>
</div>
<div class="doc doc-object doc-class">
<h2 id="pyiceberg.avro.reader.TimeReader" class="doc doc-heading">
<code>TimeReader</code>
<a href="#pyiceberg.avro.reader.TimeReader" class="headerlink" title="Permanent link">&para;</a></h2>
<div class="doc doc-contents ">
<p class="doc doc-class-bases">
Bases: <code><a class="autorefs autorefs-internal" title="IntegerReader (pyiceberg.avro.reader.IntegerReader)" href="#pyiceberg.avro.reader.IntegerReader">IntegerReader</a></code></p>
<p>Reads a microsecond granularity timestamp from the stream.</p>
<p>Long is decoded as an integer which represents
the number of microseconds from the unix epoch, 1 January 1970.</p>
<details class="quote">
<summary>Source code in <code>pyiceberg/avro/reader.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-162">162</a></span>
<span class="normal"><a href="#__codelineno-0-163">163</a></span>
<span class="normal"><a href="#__codelineno-0-164">164</a></span>
<span class="normal"><a href="#__codelineno-0-165">165</a></span>
<span class="normal"><a href="#__codelineno-0-166">166</a></span>
<span class="normal"><a href="#__codelineno-0-167">167</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-162" name="__codelineno-0-162"></a><span class="k">class</span><span class="w"> </span><span class="nc">TimeReader</span><span class="p">(</span><span class="n">IntegerReader</span><span class="p">):</span>
<a id="__codelineno-0-163" name="__codelineno-0-163"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Reads a microsecond granularity timestamp from the stream.</span>
<a id="__codelineno-0-164" name="__codelineno-0-164"></a>
<a id="__codelineno-0-165" name="__codelineno-0-165"></a><span class="sd"> Long is decoded as an integer which represents</span>
<a id="__codelineno-0-166" name="__codelineno-0-166"></a><span class="sd"> the number of microseconds from the unix epoch, 1 January 1970.</span>
<a id="__codelineno-0-167" name="__codelineno-0-167"></a><span class="sd"> &quot;&quot;&quot;</span>
</code></pre></div></td></tr></table></div>
</details>
<div class="doc doc-children">
</div>
</div>
</div>
<div class="doc doc-object doc-class">
<h2 id="pyiceberg.avro.reader.TimestampNanoReader" class="doc doc-heading">
<code>TimestampNanoReader</code>
<a href="#pyiceberg.avro.reader.TimestampNanoReader" class="headerlink" title="Permanent link">&para;</a></h2>
<div class="doc doc-contents ">
<p class="doc doc-class-bases">
Bases: <code><a class="autorefs autorefs-internal" title="IntegerReader (pyiceberg.avro.reader.IntegerReader)" href="#pyiceberg.avro.reader.IntegerReader">IntegerReader</a></code></p>
<p>Reads a nanosecond granularity timestamp from the stream.</p>
<p>Long is decoded as python integer which represents
the number of nanoseconds from the unix epoch, 1 January 1970.</p>
<details class="quote">
<summary>Source code in <code>pyiceberg/avro/reader.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-178">178</a></span>
<span class="normal"><a href="#__codelineno-0-179">179</a></span>
<span class="normal"><a href="#__codelineno-0-180">180</a></span>
<span class="normal"><a href="#__codelineno-0-181">181</a></span>
<span class="normal"><a href="#__codelineno-0-182">182</a></span>
<span class="normal"><a href="#__codelineno-0-183">183</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-178" name="__codelineno-0-178"></a><span class="k">class</span><span class="w"> </span><span class="nc">TimestampNanoReader</span><span class="p">(</span><span class="n">IntegerReader</span><span class="p">):</span>
<a id="__codelineno-0-179" name="__codelineno-0-179"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Reads a nanosecond granularity timestamp from the stream.</span>
<a id="__codelineno-0-180" name="__codelineno-0-180"></a>
<a id="__codelineno-0-181" name="__codelineno-0-181"></a><span class="sd"> Long is decoded as python integer which represents</span>
<a id="__codelineno-0-182" name="__codelineno-0-182"></a><span class="sd"> the number of nanoseconds from the unix epoch, 1 January 1970.</span>
<a id="__codelineno-0-183" name="__codelineno-0-183"></a><span class="sd"> &quot;&quot;&quot;</span>
</code></pre></div></td></tr></table></div>
</details>
<div class="doc doc-children">
</div>
</div>
</div>
<div class="doc doc-object doc-class">
<h2 id="pyiceberg.avro.reader.TimestampReader" class="doc doc-heading">
<code>TimestampReader</code>
<a href="#pyiceberg.avro.reader.TimestampReader" class="headerlink" title="Permanent link">&para;</a></h2>
<div class="doc doc-contents ">
<p class="doc doc-class-bases">
Bases: <code><a class="autorefs autorefs-internal" title="IntegerReader (pyiceberg.avro.reader.IntegerReader)" href="#pyiceberg.avro.reader.IntegerReader">IntegerReader</a></code></p>
<p>Reads a microsecond granularity timestamp from the stream.</p>
<p>Long is decoded as python integer which represents
the number of microseconds from the unix epoch, 1 January 1970.</p>
<details class="quote">
<summary>Source code in <code>pyiceberg/avro/reader.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-170">170</a></span>
<span class="normal"><a href="#__codelineno-0-171">171</a></span>
<span class="normal"><a href="#__codelineno-0-172">172</a></span>
<span class="normal"><a href="#__codelineno-0-173">173</a></span>
<span class="normal"><a href="#__codelineno-0-174">174</a></span>
<span class="normal"><a href="#__codelineno-0-175">175</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-170" name="__codelineno-0-170"></a><span class="k">class</span><span class="w"> </span><span class="nc">TimestampReader</span><span class="p">(</span><span class="n">IntegerReader</span><span class="p">):</span>
<a id="__codelineno-0-171" name="__codelineno-0-171"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Reads a microsecond granularity timestamp from the stream.</span>
<a id="__codelineno-0-172" name="__codelineno-0-172"></a>
<a id="__codelineno-0-173" name="__codelineno-0-173"></a><span class="sd"> Long is decoded as python integer which represents</span>
<a id="__codelineno-0-174" name="__codelineno-0-174"></a><span class="sd"> the number of microseconds from the unix epoch, 1 January 1970.</span>
<a id="__codelineno-0-175" name="__codelineno-0-175"></a><span class="sd"> &quot;&quot;&quot;</span>
</code></pre></div></td></tr></table></div>
</details>
<div class="doc doc-children">
</div>
</div>
</div>
<div class="doc doc-object doc-class">
<h2 id="pyiceberg.avro.reader.TimestamptzNanoReader" class="doc doc-heading">
<code>TimestamptzNanoReader</code>
<a href="#pyiceberg.avro.reader.TimestamptzNanoReader" class="headerlink" title="Permanent link">&para;</a></h2>
<div class="doc doc-contents ">
<p class="doc doc-class-bases">
Bases: <code><a class="autorefs autorefs-internal" title="IntegerReader (pyiceberg.avro.reader.IntegerReader)" href="#pyiceberg.avro.reader.IntegerReader">IntegerReader</a></code></p>
<p>Reads a microsecond granularity timestamptz from the stream.</p>
<p>Long is decoded as python integer which represents
the number of nanoseconds from the unix epoch, 1 January 1970.</p>
<p>Adjusted to UTC.</p>
<details class="quote">
<summary>Source code in <code>pyiceberg/avro/reader.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-196">196</a></span>
<span class="normal"><a href="#__codelineno-0-197">197</a></span>
<span class="normal"><a href="#__codelineno-0-198">198</a></span>
<span class="normal"><a href="#__codelineno-0-199">199</a></span>
<span class="normal"><a href="#__codelineno-0-200">200</a></span>
<span class="normal"><a href="#__codelineno-0-201">201</a></span>
<span class="normal"><a href="#__codelineno-0-202">202</a></span>
<span class="normal"><a href="#__codelineno-0-203">203</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-196" name="__codelineno-0-196"></a><span class="k">class</span><span class="w"> </span><span class="nc">TimestamptzNanoReader</span><span class="p">(</span><span class="n">IntegerReader</span><span class="p">):</span>
<a id="__codelineno-0-197" name="__codelineno-0-197"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Reads a microsecond granularity timestamptz from the stream.</span>
<a id="__codelineno-0-198" name="__codelineno-0-198"></a>
<a id="__codelineno-0-199" name="__codelineno-0-199"></a><span class="sd"> Long is decoded as python integer which represents</span>
<a id="__codelineno-0-200" name="__codelineno-0-200"></a><span class="sd"> the number of nanoseconds from the unix epoch, 1 January 1970.</span>
<a id="__codelineno-0-201" name="__codelineno-0-201"></a>
<a id="__codelineno-0-202" name="__codelineno-0-202"></a><span class="sd"> Adjusted to UTC.</span>
<a id="__codelineno-0-203" name="__codelineno-0-203"></a><span class="sd"> &quot;&quot;&quot;</span>
</code></pre></div></td></tr></table></div>
</details>
<div class="doc doc-children">
</div>
</div>
</div>
<div class="doc doc-object doc-class">
<h2 id="pyiceberg.avro.reader.TimestamptzReader" class="doc doc-heading">
<code>TimestamptzReader</code>
<a href="#pyiceberg.avro.reader.TimestamptzReader" class="headerlink" title="Permanent link">&para;</a></h2>
<div class="doc doc-contents ">
<p class="doc doc-class-bases">
Bases: <code><a class="autorefs autorefs-internal" title="IntegerReader (pyiceberg.avro.reader.IntegerReader)" href="#pyiceberg.avro.reader.IntegerReader">IntegerReader</a></code></p>
<p>Reads a microsecond granularity timestamptz from the stream.</p>
<p>Long is decoded as python integer which represents
the number of microseconds from the unix epoch, 1 January 1970.</p>
<p>Adjusted to UTC.</p>
<details class="quote">
<summary>Source code in <code>pyiceberg/avro/reader.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-186">186</a></span>
<span class="normal"><a href="#__codelineno-0-187">187</a></span>
<span class="normal"><a href="#__codelineno-0-188">188</a></span>
<span class="normal"><a href="#__codelineno-0-189">189</a></span>
<span class="normal"><a href="#__codelineno-0-190">190</a></span>
<span class="normal"><a href="#__codelineno-0-191">191</a></span>
<span class="normal"><a href="#__codelineno-0-192">192</a></span>
<span class="normal"><a href="#__codelineno-0-193">193</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-186" name="__codelineno-0-186"></a><span class="k">class</span><span class="w"> </span><span class="nc">TimestamptzReader</span><span class="p">(</span><span class="n">IntegerReader</span><span class="p">):</span>
<a id="__codelineno-0-187" name="__codelineno-0-187"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Reads a microsecond granularity timestamptz from the stream.</span>
<a id="__codelineno-0-188" name="__codelineno-0-188"></a>
<a id="__codelineno-0-189" name="__codelineno-0-189"></a><span class="sd"> Long is decoded as python integer which represents</span>
<a id="__codelineno-0-190" name="__codelineno-0-190"></a><span class="sd"> the number of microseconds from the unix epoch, 1 January 1970.</span>
<a id="__codelineno-0-191" name="__codelineno-0-191"></a>
<a id="__codelineno-0-192" name="__codelineno-0-192"></a><span class="sd"> Adjusted to UTC.</span>
<a id="__codelineno-0-193" name="__codelineno-0-193"></a><span class="sd"> &quot;&quot;&quot;</span>
</code></pre></div></td></tr></table></div>
</details>
<div class="doc doc-children">
</div>
</div>
</div>
</div>
</div>
</div>
</article>
</div>
<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
</div>
<button type="button" class="md-top md-icon" data-md-component="top" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg>
Back to top
</button>
</main>
<footer class="md-footer">
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-copyright">
Made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
</a>
</div>
</div>
</div>
</footer>
</div>
<div class="md-dialog" data-md-component="dialog">
<div class="md-dialog__inner md-typeset"></div>
</div>
<script id="__config" type="application/json">{"base": "../../../..", "features": ["navigation.top", "navigation.tracking", "navigation.tabs", "navigation.tabs.sticky", "content.code.copy"], "search": "../../../../assets/javascripts/workers/search.973d3a69.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script>
<script src="../../../../assets/javascripts/bundle.f55a23d4.min.js"></script>
</body>
</html>