| |
| <!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/types/"> |
| |
| |
| <link rel="prev" href="../typedef/"> |
| |
| |
| <link rel="next" href="../utils/"> |
| |
| |
| <link rel="icon" href="../../../assets/images/iceberg-logo-icon.png"> |
| <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.6.21"> |
| |
| |
| |
| <title>types - 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.types" 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"> |
| |
| types |
| |
| </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--nested"> |
| |
| |
| |
| <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_8_1_1" > |
| |
| |
| <div class="md-nav__link md-nav__container"> |
| <a href="../avro/" 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="false"> |
| <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="../avro/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="../avro/codecs/bzip2/" class="md-nav__link"> |
| |
| |
| |
| <span class="md-ellipsis"> |
| bzip2 |
| |
| </span> |
| |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li class="md-nav__item"> |
| <a href="../avro/codecs/codec/" class="md-nav__link"> |
| |
| |
| |
| <span class="md-ellipsis"> |
| codec |
| |
| </span> |
| |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li class="md-nav__item"> |
| <a href="../avro/codecs/deflate/" class="md-nav__link"> |
| |
| |
| |
| <span class="md-ellipsis"> |
| deflate |
| |
| </span> |
| |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li class="md-nav__item"> |
| <a href="../avro/codecs/snappy_codec/" class="md-nav__link"> |
| |
| |
| |
| <span class="md-ellipsis"> |
| snappy_codec |
| |
| </span> |
| |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li class="md-nav__item"> |
| <a href="../avro/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="../avro/decoder/" class="md-nav__link"> |
| |
| |
| |
| <span class="md-ellipsis"> |
| decoder |
| |
| </span> |
| |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li class="md-nav__item"> |
| <a href="../avro/encoder/" class="md-nav__link"> |
| |
| |
| |
| <span class="md-ellipsis"> |
| encoder |
| |
| </span> |
| |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li class="md-nav__item"> |
| <a href="../avro/file/" class="md-nav__link"> |
| |
| |
| |
| <span class="md-ellipsis"> |
| file |
| |
| </span> |
| |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li class="md-nav__item"> |
| <a href="../avro/reader/" class="md-nav__link"> |
| |
| |
| |
| <span class="md-ellipsis"> |
| reader |
| |
| </span> |
| |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li class="md-nav__item"> |
| <a href="../avro/resolver/" class="md-nav__link"> |
| |
| |
| |
| <span class="md-ellipsis"> |
| resolver |
| |
| </span> |
| |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li class="md-nav__item"> |
| <a href="../avro/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 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"> |
| types |
| |
| </span> |
| |
| |
| <span class="md-nav__icon md-icon"></span> |
| </label> |
| |
| <a href="./" class="md-nav__link md-nav__link--active"> |
| |
| |
| |
| <span class="md-ellipsis"> |
| types |
| |
| </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.types" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| types |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.BinaryType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| BinaryType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.BooleanType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| BooleanType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.DateType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| DateType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.DecimalType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| DecimalType |
| </span> |
| </a> |
| |
| <nav class="md-nav" aria-label="DecimalType"> |
| <ul class="md-nav__list"> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.DecimalType.precision" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| precision |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.DecimalType.scale" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| scale |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.DecimalType.__eq__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __eq__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.DecimalType.__getnewargs__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __getnewargs__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.DecimalType.__hash__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __hash__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.DecimalType.__repr__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __repr__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.DecimalType.__str__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __str__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.DecimalType.ser_model" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| ser_model |
| </span> |
| </a> |
| |
| </li> |
| |
| </ul> |
| </nav> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.DoubleType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| DoubleType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.FixedType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| FixedType |
| </span> |
| </a> |
| |
| <nav class="md-nav" aria-label="FixedType"> |
| <ul class="md-nav__list"> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.FixedType.__getnewargs__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __getnewargs__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.FixedType.__len__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __len__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.FixedType.__repr__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __repr__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.FixedType.__str__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __str__ |
| </span> |
| </a> |
| |
| </li> |
| |
| </ul> |
| </nav> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.FloatType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| FloatType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.IcebergType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| IcebergType |
| </span> |
| </a> |
| |
| <nav class="md-nav" aria-label="IcebergType"> |
| <ul class="md-nav__list"> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.IcebergType.minimum_format_version" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| minimum_format_version |
| </span> |
| </a> |
| |
| </li> |
| |
| </ul> |
| </nav> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.IntegerType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| IntegerType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.ListType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| ListType |
| </span> |
| </a> |
| |
| <nav class="md-nav" aria-label="ListType"> |
| <ul class="md-nav__list"> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.ListType.__eq__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __eq__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.ListType.__getnewargs__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __getnewargs__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.ListType.__hash__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __hash__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.ListType.__str__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __str__ |
| </span> |
| </a> |
| |
| </li> |
| |
| </ul> |
| </nav> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.LongType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| LongType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.MapType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| MapType |
| </span> |
| </a> |
| |
| <nav class="md-nav" aria-label="MapType"> |
| <ul class="md-nav__list"> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.MapType.__eq__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __eq__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.MapType.__getnewargs__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __getnewargs__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.MapType.__hash__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __hash__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.MapType.__str__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __str__ |
| </span> |
| </a> |
| |
| </li> |
| |
| </ul> |
| </nav> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.NestedField" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| NestedField |
| </span> |
| </a> |
| |
| <nav class="md-nav" aria-label="NestedField"> |
| <ul class="md-nav__list"> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.NestedField.__getnewargs__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __getnewargs__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.NestedField.__repr__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __repr__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.NestedField.__str__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __str__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.NestedField.convert_field_type" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| convert_field_type |
| </span> |
| </a> |
| |
| </li> |
| |
| </ul> |
| </nav> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.PrimitiveType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| PrimitiveType |
| </span> |
| </a> |
| |
| <nav class="md-nav" aria-label="PrimitiveType"> |
| <ul class="md-nav__list"> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.PrimitiveType.__repr__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __repr__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.PrimitiveType.__str__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __str__ |
| </span> |
| </a> |
| |
| </li> |
| |
| </ul> |
| </nav> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.StringType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| StringType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.StructType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| StructType |
| </span> |
| </a> |
| |
| <nav class="md-nav" aria-label="StructType"> |
| <ul class="md-nav__list"> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.StructType.__eq__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __eq__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.StructType.__getnewargs__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __getnewargs__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.StructType.__hash__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __hash__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.StructType.__len__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __len__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.StructType.__repr__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __repr__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.StructType.__str__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __str__ |
| </span> |
| </a> |
| |
| </li> |
| |
| </ul> |
| </nav> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.TimeType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| TimeType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.TimestampNanoType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| TimestampNanoType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.TimestampType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| TimestampType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.TimestamptzNanoType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| TimestamptzNanoType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.TimestamptzType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| TimestamptzType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.UUIDType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| UUIDType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.UnknownType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| UnknownType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.strtobool" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| strtobool |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.transform_dict_value_to_str" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| transform_dict_value_to_str |
| </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_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.types" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| types |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.BinaryType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| BinaryType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.BooleanType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| BooleanType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.DateType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| DateType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.DecimalType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| DecimalType |
| </span> |
| </a> |
| |
| <nav class="md-nav" aria-label="DecimalType"> |
| <ul class="md-nav__list"> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.DecimalType.precision" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| precision |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.DecimalType.scale" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| scale |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.DecimalType.__eq__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __eq__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.DecimalType.__getnewargs__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __getnewargs__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.DecimalType.__hash__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __hash__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.DecimalType.__repr__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __repr__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.DecimalType.__str__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __str__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.DecimalType.ser_model" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| ser_model |
| </span> |
| </a> |
| |
| </li> |
| |
| </ul> |
| </nav> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.DoubleType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| DoubleType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.FixedType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| FixedType |
| </span> |
| </a> |
| |
| <nav class="md-nav" aria-label="FixedType"> |
| <ul class="md-nav__list"> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.FixedType.__getnewargs__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __getnewargs__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.FixedType.__len__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __len__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.FixedType.__repr__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __repr__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.FixedType.__str__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __str__ |
| </span> |
| </a> |
| |
| </li> |
| |
| </ul> |
| </nav> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.FloatType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| FloatType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.IcebergType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| IcebergType |
| </span> |
| </a> |
| |
| <nav class="md-nav" aria-label="IcebergType"> |
| <ul class="md-nav__list"> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.IcebergType.minimum_format_version" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| minimum_format_version |
| </span> |
| </a> |
| |
| </li> |
| |
| </ul> |
| </nav> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.IntegerType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| IntegerType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.ListType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| ListType |
| </span> |
| </a> |
| |
| <nav class="md-nav" aria-label="ListType"> |
| <ul class="md-nav__list"> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.ListType.__eq__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __eq__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.ListType.__getnewargs__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __getnewargs__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.ListType.__hash__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __hash__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.ListType.__str__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __str__ |
| </span> |
| </a> |
| |
| </li> |
| |
| </ul> |
| </nav> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.LongType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| LongType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.MapType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| MapType |
| </span> |
| </a> |
| |
| <nav class="md-nav" aria-label="MapType"> |
| <ul class="md-nav__list"> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.MapType.__eq__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __eq__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.MapType.__getnewargs__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __getnewargs__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.MapType.__hash__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __hash__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.MapType.__str__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __str__ |
| </span> |
| </a> |
| |
| </li> |
| |
| </ul> |
| </nav> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.NestedField" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| NestedField |
| </span> |
| </a> |
| |
| <nav class="md-nav" aria-label="NestedField"> |
| <ul class="md-nav__list"> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.NestedField.__getnewargs__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __getnewargs__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.NestedField.__repr__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __repr__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.NestedField.__str__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __str__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.NestedField.convert_field_type" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| convert_field_type |
| </span> |
| </a> |
| |
| </li> |
| |
| </ul> |
| </nav> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.PrimitiveType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| PrimitiveType |
| </span> |
| </a> |
| |
| <nav class="md-nav" aria-label="PrimitiveType"> |
| <ul class="md-nav__list"> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.PrimitiveType.__repr__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __repr__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.PrimitiveType.__str__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __str__ |
| </span> |
| </a> |
| |
| </li> |
| |
| </ul> |
| </nav> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.StringType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| StringType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.StructType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| StructType |
| </span> |
| </a> |
| |
| <nav class="md-nav" aria-label="StructType"> |
| <ul class="md-nav__list"> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.StructType.__eq__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __eq__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.StructType.__getnewargs__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __getnewargs__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.StructType.__hash__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __hash__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.StructType.__len__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __len__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.StructType.__repr__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __repr__ |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.StructType.__str__" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| __str__ |
| </span> |
| </a> |
| |
| </li> |
| |
| </ul> |
| </nav> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.TimeType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| TimeType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.TimestampNanoType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| TimestampNanoType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.TimestampType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| TimestampType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.TimestamptzNanoType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| TimestamptzNanoType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.TimestamptzType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| TimestamptzType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.UUIDType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| UUIDType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.UnknownType" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| UnknownType |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.strtobool" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| strtobool |
| </span> |
| </a> |
| |
| </li> |
| |
| <li class="md-nav__item"> |
| <a href="#pyiceberg.types.transform_dict_value_to_str" class="md-nav__link"> |
| <span class="md-ellipsis"> |
| transform_dict_value_to_str |
| </span> |
| </a> |
| |
| </li> |
| |
| </ul> |
| |
| </nav> |
| </div> |
| </div> |
| </div> |
| |
| |
| |
| <div class="md-content" data-md-component="content"> |
| <article class="md-content__inner md-typeset"> |
| |
| |
| |
| |
| |
| |
| |
| |
| <h1>types</h1> |
| |
| <div class="doc doc-object doc-module"> |
| |
| |
| |
| <a id="pyiceberg.types"></a> |
| <div class="doc doc-contents first"> |
| |
| <p>Data types used in describing Iceberg schemas.</p> |
| <p>This module implements the data types described in the Iceberg specification for Iceberg schemas. To |
| describe an Iceberg table schema, these classes can be used in the construction of a StructType instance.</p> |
| |
| |
| <details class="example" open> |
| <summary>Example</summary> |
| <blockquote> |
| <blockquote> |
| <blockquote> |
| <p>str(StructType( |
| ... NestedField(1, "required_field", StringType(), True), |
| ... NestedField(2, "optional_field", IntegerType()) |
| ... )) |
| 'struct<1: required_field: required string, 2: optional_field: optional int>'</p> |
| </blockquote> |
| </blockquote> |
| </blockquote> |
| </details> |
| |
| <details class="notes" open> |
| <summary>Notes</summary> |
| <ul> |
| <li>https://iceberg.apache.org/spec/#primitive-types</li> |
| </ul> |
| </details> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div class="doc doc-children"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div class="doc doc-object doc-class"> |
| |
| |
| |
| <h2 id="pyiceberg.types.BinaryType" class="doc doc-heading"> |
| <code>BinaryType</code> |
| |
| |
| <a href="#pyiceberg.types.BinaryType" class="headerlink" title="Permanent link">¶</a></h2> |
| |
| |
| <div class="doc doc-contents "> |
| <p class="doc doc-class-bases"> |
| Bases: <code><a class="autorefs autorefs-internal" title="PrimitiveType (pyiceberg.types.PrimitiveType)" href="#pyiceberg.types.PrimitiveType">PrimitiveType</a></code></p> |
| |
| |
| <p>A Binary data type in Iceberg can be represented using an instance of this class.</p> |
| <p>Binaries in Iceberg are arbitrary-length byte arrays.</p> |
| |
| |
| <details class="example" open> |
| <summary>Example</summary> |
| <blockquote> |
| <blockquote> |
| <blockquote> |
| <p>column_foo = BinaryType() |
| isinstance(column_foo, BinaryType) |
| True |
| column_foo |
| BinaryType()</p> |
| </blockquote> |
| </blockquote> |
| </blockquote> |
| </details> |
| |
| |
| |
| |
| |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-852">852</a></span> |
| <span class="normal"><a href="#__codelineno-0-853">853</a></span> |
| <span class="normal"><a href="#__codelineno-0-854">854</a></span> |
| <span class="normal"><a href="#__codelineno-0-855">855</a></span> |
| <span class="normal"><a href="#__codelineno-0-856">856</a></span> |
| <span class="normal"><a href="#__codelineno-0-857">857</a></span> |
| <span class="normal"><a href="#__codelineno-0-858">858</a></span> |
| <span class="normal"><a href="#__codelineno-0-859">859</a></span> |
| <span class="normal"><a href="#__codelineno-0-860">860</a></span> |
| <span class="normal"><a href="#__codelineno-0-861">861</a></span> |
| <span class="normal"><a href="#__codelineno-0-862">862</a></span> |
| <span class="normal"><a href="#__codelineno-0-863">863</a></span> |
| <span class="normal"><a href="#__codelineno-0-864">864</a></span> |
| <span class="normal"><a href="#__codelineno-0-865">865</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-852" name="__codelineno-0-852"></a><span class="k">class</span><span class="w"> </span><span class="nc">BinaryType</span><span class="p">(</span><span class="n">PrimitiveType</span><span class="p">):</span> |
| <a id="__codelineno-0-853" name="__codelineno-0-853"></a><span class="w"> </span><span class="sd">"""A Binary data type in Iceberg can be represented using an instance of this class.</span> |
| <a id="__codelineno-0-854" name="__codelineno-0-854"></a> |
| <a id="__codelineno-0-855" name="__codelineno-0-855"></a><span class="sd"> Binaries in Iceberg are arbitrary-length byte arrays.</span> |
| <a id="__codelineno-0-856" name="__codelineno-0-856"></a> |
| <a id="__codelineno-0-857" name="__codelineno-0-857"></a><span class="sd"> Example:</span> |
| <a id="__codelineno-0-858" name="__codelineno-0-858"></a><span class="sd"> >>> column_foo = BinaryType()</span> |
| <a id="__codelineno-0-859" name="__codelineno-0-859"></a><span class="sd"> >>> isinstance(column_foo, BinaryType)</span> |
| <a id="__codelineno-0-860" name="__codelineno-0-860"></a><span class="sd"> True</span> |
| <a id="__codelineno-0-861" name="__codelineno-0-861"></a><span class="sd"> >>> column_foo</span> |
| <a id="__codelineno-0-862" name="__codelineno-0-862"></a><span class="sd"> BinaryType()</span> |
| <a id="__codelineno-0-863" name="__codelineno-0-863"></a><span class="sd"> """</span> |
| <a id="__codelineno-0-864" name="__codelineno-0-864"></a> |
| <a id="__codelineno-0-865" name="__codelineno-0-865"></a> <span class="n">root</span><span class="p">:</span> <span class="n">Literal</span><span class="p">[</span><span class="s2">"binary"</span><span class="p">]</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"binary"</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.types.BooleanType" class="doc doc-heading"> |
| <code>BooleanType</code> |
| |
| |
| <a href="#pyiceberg.types.BooleanType" class="headerlink" title="Permanent link">¶</a></h2> |
| |
| |
| <div class="doc doc-contents "> |
| <p class="doc doc-class-bases"> |
| Bases: <code><a class="autorefs autorefs-internal" title="PrimitiveType (pyiceberg.types.PrimitiveType)" href="#pyiceberg.types.PrimitiveType">PrimitiveType</a></code></p> |
| |
| |
| <p>A boolean data type in Iceberg can be represented using an instance of this class.</p> |
| |
| |
| <details class="example" open> |
| <summary>Example</summary> |
| <blockquote> |
| <blockquote> |
| <blockquote> |
| <p>column_foo = BooleanType() |
| isinstance(column_foo, BooleanType) |
| True |
| column_foo |
| BooleanType()</p> |
| </blockquote> |
| </blockquote> |
| </blockquote> |
| </details> |
| |
| |
| |
| |
| |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-613">613</a></span> |
| <span class="normal"><a href="#__codelineno-0-614">614</a></span> |
| <span class="normal"><a href="#__codelineno-0-615">615</a></span> |
| <span class="normal"><a href="#__codelineno-0-616">616</a></span> |
| <span class="normal"><a href="#__codelineno-0-617">617</a></span> |
| <span class="normal"><a href="#__codelineno-0-618">618</a></span> |
| <span class="normal"><a href="#__codelineno-0-619">619</a></span> |
| <span class="normal"><a href="#__codelineno-0-620">620</a></span> |
| <span class="normal"><a href="#__codelineno-0-621">621</a></span> |
| <span class="normal"><a href="#__codelineno-0-622">622</a></span> |
| <span class="normal"><a href="#__codelineno-0-623">623</a></span> |
| <span class="normal"><a href="#__codelineno-0-624">624</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-613" name="__codelineno-0-613"></a><span class="k">class</span><span class="w"> </span><span class="nc">BooleanType</span><span class="p">(</span><span class="n">PrimitiveType</span><span class="p">):</span> |
| <a id="__codelineno-0-614" name="__codelineno-0-614"></a><span class="w"> </span><span class="sd">"""A boolean data type in Iceberg can be represented using an instance of this class.</span> |
| <a id="__codelineno-0-615" name="__codelineno-0-615"></a> |
| <a id="__codelineno-0-616" name="__codelineno-0-616"></a><span class="sd"> Example:</span> |
| <a id="__codelineno-0-617" name="__codelineno-0-617"></a><span class="sd"> >>> column_foo = BooleanType()</span> |
| <a id="__codelineno-0-618" name="__codelineno-0-618"></a><span class="sd"> >>> isinstance(column_foo, BooleanType)</span> |
| <a id="__codelineno-0-619" name="__codelineno-0-619"></a><span class="sd"> True</span> |
| <a id="__codelineno-0-620" name="__codelineno-0-620"></a><span class="sd"> >>> column_foo</span> |
| <a id="__codelineno-0-621" name="__codelineno-0-621"></a><span class="sd"> BooleanType()</span> |
| <a id="__codelineno-0-622" name="__codelineno-0-622"></a><span class="sd"> """</span> |
| <a id="__codelineno-0-623" name="__codelineno-0-623"></a> |
| <a id="__codelineno-0-624" name="__codelineno-0-624"></a> <span class="n">root</span><span class="p">:</span> <span class="n">Literal</span><span class="p">[</span><span class="s2">"boolean"</span><span class="p">]</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"boolean"</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.types.DateType" class="doc doc-heading"> |
| <code>DateType</code> |
| |
| |
| <a href="#pyiceberg.types.DateType" class="headerlink" title="Permanent link">¶</a></h2> |
| |
| |
| <div class="doc doc-contents "> |
| <p class="doc doc-class-bases"> |
| Bases: <code><a class="autorefs autorefs-internal" title="PrimitiveType (pyiceberg.types.PrimitiveType)" href="#pyiceberg.types.PrimitiveType">PrimitiveType</a></code></p> |
| |
| |
| <p>A Date data type in Iceberg can be represented using an instance of this class.</p> |
| <p>Dates in Iceberg are calendar dates without a timezone or time.</p> |
| |
| |
| <details class="example" open> |
| <summary>Example</summary> |
| <blockquote> |
| <blockquote> |
| <blockquote> |
| <p>column_foo = DateType() |
| isinstance(column_foo, DateType) |
| True |
| column_foo |
| DateType()</p> |
| </blockquote> |
| </blockquote> |
| </blockquote> |
| </details> |
| |
| |
| |
| |
| |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-718">718</a></span> |
| <span class="normal"><a href="#__codelineno-0-719">719</a></span> |
| <span class="normal"><a href="#__codelineno-0-720">720</a></span> |
| <span class="normal"><a href="#__codelineno-0-721">721</a></span> |
| <span class="normal"><a href="#__codelineno-0-722">722</a></span> |
| <span class="normal"><a href="#__codelineno-0-723">723</a></span> |
| <span class="normal"><a href="#__codelineno-0-724">724</a></span> |
| <span class="normal"><a href="#__codelineno-0-725">725</a></span> |
| <span class="normal"><a href="#__codelineno-0-726">726</a></span> |
| <span class="normal"><a href="#__codelineno-0-727">727</a></span> |
| <span class="normal"><a href="#__codelineno-0-728">728</a></span> |
| <span class="normal"><a href="#__codelineno-0-729">729</a></span> |
| <span class="normal"><a href="#__codelineno-0-730">730</a></span> |
| <span class="normal"><a href="#__codelineno-0-731">731</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-718" name="__codelineno-0-718"></a><span class="k">class</span><span class="w"> </span><span class="nc">DateType</span><span class="p">(</span><span class="n">PrimitiveType</span><span class="p">):</span> |
| <a id="__codelineno-0-719" name="__codelineno-0-719"></a><span class="w"> </span><span class="sd">"""A Date data type in Iceberg can be represented using an instance of this class.</span> |
| <a id="__codelineno-0-720" name="__codelineno-0-720"></a> |
| <a id="__codelineno-0-721" name="__codelineno-0-721"></a><span class="sd"> Dates in Iceberg are calendar dates without a timezone or time.</span> |
| <a id="__codelineno-0-722" name="__codelineno-0-722"></a> |
| <a id="__codelineno-0-723" name="__codelineno-0-723"></a><span class="sd"> Example:</span> |
| <a id="__codelineno-0-724" name="__codelineno-0-724"></a><span class="sd"> >>> column_foo = DateType()</span> |
| <a id="__codelineno-0-725" name="__codelineno-0-725"></a><span class="sd"> >>> isinstance(column_foo, DateType)</span> |
| <a id="__codelineno-0-726" name="__codelineno-0-726"></a><span class="sd"> True</span> |
| <a id="__codelineno-0-727" name="__codelineno-0-727"></a><span class="sd"> >>> column_foo</span> |
| <a id="__codelineno-0-728" name="__codelineno-0-728"></a><span class="sd"> DateType()</span> |
| <a id="__codelineno-0-729" name="__codelineno-0-729"></a><span class="sd"> """</span> |
| <a id="__codelineno-0-730" name="__codelineno-0-730"></a> |
| <a id="__codelineno-0-731" name="__codelineno-0-731"></a> <span class="n">root</span><span class="p">:</span> <span class="n">Literal</span><span class="p">[</span><span class="s2">"date"</span><span class="p">]</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"date"</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.types.DecimalType" class="doc doc-heading"> |
| <code>DecimalType</code> |
| |
| |
| <a href="#pyiceberg.types.DecimalType" class="headerlink" title="Permanent link">¶</a></h2> |
| |
| |
| <div class="doc doc-contents "> |
| <p class="doc doc-class-bases"> |
| Bases: <code><a class="autorefs autorefs-internal" title="PrimitiveType (pyiceberg.types.PrimitiveType)" href="#pyiceberg.types.PrimitiveType">PrimitiveType</a></code></p> |
| |
| |
| <p>A decimal data type in Iceberg.</p> |
| |
| |
| <details class="example" open> |
| <summary>Example</summary> |
| <blockquote> |
| <blockquote> |
| <blockquote> |
| <p>DecimalType(32, 3) |
| DecimalType(precision=32, scale=3) |
| DecimalType(8, 3) == DecimalType(8, 3) |
| True</p> |
| </blockquote> |
| </blockquote> |
| </blockquote> |
| </details> |
| |
| |
| |
| |
| |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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> |
| <span class="normal"><a href="#__codelineno-0-247">247</a></span> |
| <span class="normal"><a href="#__codelineno-0-248">248</a></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> |
| <span class="normal"><a href="#__codelineno-0-261">261</a></span> |
| <span class="normal"><a href="#__codelineno-0-262">262</a></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> |
| <span class="normal"><a href="#__codelineno-0-289">289</a></span> |
| <span class="normal"><a href="#__codelineno-0-290">290</a></span> |
| <span class="normal"><a href="#__codelineno-0-291">291</a></span> |
| <span class="normal"><a href="#__codelineno-0-292">292</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">class</span><span class="w"> </span><span class="nc">DecimalType</span><span class="p">(</span><span class="n">PrimitiveType</span><span class="p">):</span> |
| <a id="__codelineno-0-245" name="__codelineno-0-245"></a><span class="w"> </span><span class="sd">"""A decimal data type in Iceberg.</span> |
| <a id="__codelineno-0-246" name="__codelineno-0-246"></a> |
| <a id="__codelineno-0-247" name="__codelineno-0-247"></a><span class="sd"> Example:</span> |
| <a id="__codelineno-0-248" name="__codelineno-0-248"></a><span class="sd"> >>> DecimalType(32, 3)</span> |
| <a id="__codelineno-0-249" name="__codelineno-0-249"></a><span class="sd"> DecimalType(precision=32, scale=3)</span> |
| <a id="__codelineno-0-250" name="__codelineno-0-250"></a><span class="sd"> >>> DecimalType(8, 3) == DecimalType(8, 3)</span> |
| <a id="__codelineno-0-251" name="__codelineno-0-251"></a><span class="sd"> True</span> |
| <a id="__codelineno-0-252" name="__codelineno-0-252"></a><span class="sd"> """</span> |
| <a id="__codelineno-0-253" name="__codelineno-0-253"></a> |
| <a id="__codelineno-0-254" name="__codelineno-0-254"></a> <span class="n">root</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="nb">int</span><span class="p">]</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="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> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> |
| <a id="__codelineno-0-257" name="__codelineno-0-257"></a> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">root</span><span class="o">=</span><span class="p">(</span><span class="n">precision</span><span class="p">,</span> <span class="n">scale</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="nd">@model_serializer</span> |
| <a id="__codelineno-0-260" name="__codelineno-0-260"></a> <span class="k">def</span><span class="w"> </span><span class="nf">ser_model</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> |
| <a id="__codelineno-0-261" name="__codelineno-0-261"></a><span class="w"> </span><span class="sd">"""Serialize the model to a string."""</span> |
| <a id="__codelineno-0-262" name="__codelineno-0-262"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"decimal(</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">)"</span> |
| <a id="__codelineno-0-263" name="__codelineno-0-263"></a> |
| <a id="__codelineno-0-264" name="__codelineno-0-264"></a> <span class="nd">@property</span> |
| <a id="__codelineno-0-265" name="__codelineno-0-265"></a> <span class="k">def</span><span class="w"> </span><span class="nf">precision</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">int</span><span class="p">:</span> |
| <a id="__codelineno-0-266" name="__codelineno-0-266"></a><span class="w"> </span><span class="sd">"""Return the precision of the decimal."""</span> |
| <a id="__codelineno-0-267" name="__codelineno-0-267"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">root</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> |
| <a id="__codelineno-0-268" name="__codelineno-0-268"></a> |
| <a id="__codelineno-0-269" name="__codelineno-0-269"></a> <span class="nd">@property</span> |
| <a id="__codelineno-0-270" name="__codelineno-0-270"></a> <span class="k">def</span><span class="w"> </span><span class="nf">scale</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">int</span><span class="p">:</span> |
| <a id="__codelineno-0-271" name="__codelineno-0-271"></a><span class="w"> </span><span class="sd">"""Return the scale of the decimal."""</span> |
| <a id="__codelineno-0-272" name="__codelineno-0-272"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">root</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> |
| <a id="__codelineno-0-273" name="__codelineno-0-273"></a> |
| <a id="__codelineno-0-274" name="__codelineno-0-274"></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">-></span> <span class="nb">str</span><span class="p">:</span> |
| <a id="__codelineno-0-275" name="__codelineno-0-275"></a><span class="w"> </span><span class="sd">"""Return the string representation of the DecimalType class."""</span> |
| <a id="__codelineno-0-276" name="__codelineno-0-276"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"DecimalType(precision=</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">, scale=</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">)"</span> |
| <a id="__codelineno-0-277" name="__codelineno-0-277"></a> |
| <a id="__codelineno-0-278" name="__codelineno-0-278"></a> <span class="k">def</span><span class="w"> </span><span class="fm">__str__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> |
| <a id="__codelineno-0-279" name="__codelineno-0-279"></a><span class="w"> </span><span class="sd">"""Return the string representation."""</span> |
| <a id="__codelineno-0-280" name="__codelineno-0-280"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"decimal(</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">)"</span> |
| <a id="__codelineno-0-281" name="__codelineno-0-281"></a> |
| <a id="__codelineno-0-282" name="__codelineno-0-282"></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">-></span> <span class="nb">int</span><span class="p">:</span> |
| <a id="__codelineno-0-283" name="__codelineno-0-283"></a><span class="w"> </span><span class="sd">"""Return the hash of the tuple."""</span> |
| <a id="__codelineno-0-284" name="__codelineno-0-284"></a> <span class="k">return</span> <span class="nb">hash</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">root</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="nf">__getnewargs__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">Tuple</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-287" name="__codelineno-0-287"></a><span class="w"> </span><span class="sd">"""Pickle the DecimalType class."""</span> |
| <a id="__codelineno-0-288" name="__codelineno-0-288"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">precision</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">scale</span> |
| <a id="__codelineno-0-289" name="__codelineno-0-289"></a> |
| <a id="__codelineno-0-290" name="__codelineno-0-290"></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">-></span> <span class="nb">bool</span><span class="p">:</span> |
| <a id="__codelineno-0-291" name="__codelineno-0-291"></a><span class="w"> </span><span class="sd">"""Compare to root to another object."""</span> |
| <a id="__codelineno-0-292" name="__codelineno-0-292"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">root</span> <span class="o">==</span> <span class="n">other</span><span class="o">.</span><span class="n">root</span> <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">DecimalType</span><span class="p">)</span> <span class="k">else</span> <span class="kc">False</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| |
| |
| |
| <div class="doc doc-children"> |
| |
| |
| |
| |
| |
| |
| |
| <div class="doc doc-object doc-attribute"> |
| |
| |
| |
| <h3 id="pyiceberg.types.DecimalType.precision" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="n">precision</span></code> |
| |
| <span class="doc doc-labels"> |
| <small class="doc doc-label doc-label-property"><code>property</code></small> |
| </span> |
| |
| <a href="#pyiceberg.types.DecimalType.precision" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Return the precision of the decimal.</p> |
| |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-attribute"> |
| |
| |
| |
| <h3 id="pyiceberg.types.DecimalType.scale" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="n">scale</span></code> |
| |
| <span class="doc doc-labels"> |
| <small class="doc doc-label doc-label-property"><code>property</code></small> |
| </span> |
| |
| <a href="#pyiceberg.types.DecimalType.scale" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Return the scale of the decimal.</p> |
| |
| </div> |
| |
| </div> |
| |
| |
| |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h3 id="pyiceberg.types.DecimalType.__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.types.DecimalType.__eq__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Compare to root to another object.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-290">290</a></span> |
| <span class="normal"><a href="#__codelineno-0-291">291</a></span> |
| <span class="normal"><a href="#__codelineno-0-292">292</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-290" name="__codelineno-0-290"></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">-></span> <span class="nb">bool</span><span class="p">:</span> |
| <a id="__codelineno-0-291" name="__codelineno-0-291"></a><span class="w"> </span><span class="sd">"""Compare to root to another object."""</span> |
| <a id="__codelineno-0-292" name="__codelineno-0-292"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">root</span> <span class="o">==</span> <span class="n">other</span><span class="o">.</span><span class="n">root</span> <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">DecimalType</span><span class="p">)</span> <span class="k">else</span> <span class="kc">False</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h3 id="pyiceberg.types.DecimalType.__getnewargs__" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="n">__getnewargs__</span><span class="p">()</span></code> |
| |
| <a href="#pyiceberg.types.DecimalType.__getnewargs__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Pickle the DecimalType class.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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="nf">__getnewargs__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">Tuple</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-287" name="__codelineno-0-287"></a><span class="w"> </span><span class="sd">"""Pickle the DecimalType class."""</span> |
| <a id="__codelineno-0-288" name="__codelineno-0-288"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">precision</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">scale</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h3 id="pyiceberg.types.DecimalType.__hash__" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="fm">__hash__</span><span class="p">()</span></code> |
| |
| <a href="#pyiceberg.types.DecimalType.__hash__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Return the hash of the tuple.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-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></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-282" name="__codelineno-0-282"></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">-></span> <span class="nb">int</span><span class="p">:</span> |
| <a id="__codelineno-0-283" name="__codelineno-0-283"></a><span class="w"> </span><span class="sd">"""Return the hash of the tuple."""</span> |
| <a id="__codelineno-0-284" name="__codelineno-0-284"></a> <span class="k">return</span> <span class="nb">hash</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">root</span><span class="p">)</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h3 id="pyiceberg.types.DecimalType.__repr__" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="fm">__repr__</span><span class="p">()</span></code> |
| |
| <a href="#pyiceberg.types.DecimalType.__repr__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Return the string representation of the DecimalType class.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-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></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-274" name="__codelineno-0-274"></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">-></span> <span class="nb">str</span><span class="p">:</span> |
| <a id="__codelineno-0-275" name="__codelineno-0-275"></a><span class="w"> </span><span class="sd">"""Return the string representation of the DecimalType class."""</span> |
| <a id="__codelineno-0-276" name="__codelineno-0-276"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"DecimalType(precision=</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">, scale=</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">)"</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h3 id="pyiceberg.types.DecimalType.__str__" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="fm">__str__</span><span class="p">()</span></code> |
| |
| <a href="#pyiceberg.types.DecimalType.__str__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Return the string representation.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-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></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-278" name="__codelineno-0-278"></a><span class="k">def</span><span class="w"> </span><span class="fm">__str__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> |
| <a id="__codelineno-0-279" name="__codelineno-0-279"></a><span class="w"> </span><span class="sd">"""Return the string representation."""</span> |
| <a id="__codelineno-0-280" name="__codelineno-0-280"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"decimal(</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">)"</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h3 id="pyiceberg.types.DecimalType.ser_model" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="n">ser_model</span><span class="p">()</span></code> |
| |
| <a href="#pyiceberg.types.DecimalType.ser_model" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Serialize the model to a string.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-259">259</a></span> |
| <span class="normal"><a href="#__codelineno-0-260">260</a></span> |
| <span class="normal"><a href="#__codelineno-0-261">261</a></span> |
| <span class="normal"><a href="#__codelineno-0-262">262</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-259" name="__codelineno-0-259"></a><span class="nd">@model_serializer</span> |
| <a id="__codelineno-0-260" name="__codelineno-0-260"></a><span class="k">def</span><span class="w"> </span><span class="nf">ser_model</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> |
| <a id="__codelineno-0-261" name="__codelineno-0-261"></a><span class="w"> </span><span class="sd">"""Serialize the model to a string."""</span> |
| <a id="__codelineno-0-262" name="__codelineno-0-262"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"decimal(</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">)"</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| |
| |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-class"> |
| |
| |
| |
| <h2 id="pyiceberg.types.DoubleType" class="doc doc-heading"> |
| <code>DoubleType</code> |
| |
| |
| <a href="#pyiceberg.types.DoubleType" class="headerlink" title="Permanent link">¶</a></h2> |
| |
| |
| <div class="doc doc-contents "> |
| <p class="doc doc-class-bases"> |
| Bases: <code><a class="autorefs autorefs-internal" title="PrimitiveType (pyiceberg.types.PrimitiveType)" href="#pyiceberg.types.PrimitiveType">PrimitiveType</a></code></p> |
| |
| |
| <p>A Double data type in Iceberg can be represented using an instance of this class.</p> |
| <p>Doubles in Iceberg are 64-bit IEEE 754 floating points.</p> |
| |
| |
| <details class="example" open> |
| <summary>Example</summary> |
| <blockquote> |
| <blockquote> |
| <blockquote> |
| <p>column_foo = DoubleType() |
| isinstance(column_foo, DoubleType) |
| True |
| column_foo |
| DoubleType()</p> |
| </blockquote> |
| </blockquote> |
| </blockquote> |
| </details> |
| |
| |
| |
| |
| |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-702">702</a></span> |
| <span class="normal"><a href="#__codelineno-0-703">703</a></span> |
| <span class="normal"><a href="#__codelineno-0-704">704</a></span> |
| <span class="normal"><a href="#__codelineno-0-705">705</a></span> |
| <span class="normal"><a href="#__codelineno-0-706">706</a></span> |
| <span class="normal"><a href="#__codelineno-0-707">707</a></span> |
| <span class="normal"><a href="#__codelineno-0-708">708</a></span> |
| <span class="normal"><a href="#__codelineno-0-709">709</a></span> |
| <span class="normal"><a href="#__codelineno-0-710">710</a></span> |
| <span class="normal"><a href="#__codelineno-0-711">711</a></span> |
| <span class="normal"><a href="#__codelineno-0-712">712</a></span> |
| <span class="normal"><a href="#__codelineno-0-713">713</a></span> |
| <span class="normal"><a href="#__codelineno-0-714">714</a></span> |
| <span class="normal"><a href="#__codelineno-0-715">715</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-702" name="__codelineno-0-702"></a><span class="k">class</span><span class="w"> </span><span class="nc">DoubleType</span><span class="p">(</span><span class="n">PrimitiveType</span><span class="p">):</span> |
| <a id="__codelineno-0-703" name="__codelineno-0-703"></a><span class="w"> </span><span class="sd">"""A Double data type in Iceberg can be represented using an instance of this class.</span> |
| <a id="__codelineno-0-704" name="__codelineno-0-704"></a> |
| <a id="__codelineno-0-705" name="__codelineno-0-705"></a><span class="sd"> Doubles in Iceberg are 64-bit IEEE 754 floating points.</span> |
| <a id="__codelineno-0-706" name="__codelineno-0-706"></a> |
| <a id="__codelineno-0-707" name="__codelineno-0-707"></a><span class="sd"> Example:</span> |
| <a id="__codelineno-0-708" name="__codelineno-0-708"></a><span class="sd"> >>> column_foo = DoubleType()</span> |
| <a id="__codelineno-0-709" name="__codelineno-0-709"></a><span class="sd"> >>> isinstance(column_foo, DoubleType)</span> |
| <a id="__codelineno-0-710" name="__codelineno-0-710"></a><span class="sd"> True</span> |
| <a id="__codelineno-0-711" name="__codelineno-0-711"></a><span class="sd"> >>> column_foo</span> |
| <a id="__codelineno-0-712" name="__codelineno-0-712"></a><span class="sd"> DoubleType()</span> |
| <a id="__codelineno-0-713" name="__codelineno-0-713"></a><span class="sd"> """</span> |
| <a id="__codelineno-0-714" name="__codelineno-0-714"></a> |
| <a id="__codelineno-0-715" name="__codelineno-0-715"></a> <span class="n">root</span><span class="p">:</span> <span class="n">Literal</span><span class="p">[</span><span class="s2">"double"</span><span class="p">]</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"double"</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.types.FixedType" class="doc doc-heading"> |
| <code>FixedType</code> |
| |
| |
| <a href="#pyiceberg.types.FixedType" class="headerlink" title="Permanent link">¶</a></h2> |
| |
| |
| <div class="doc doc-contents "> |
| <p class="doc doc-class-bases"> |
| Bases: <code><a class="autorefs autorefs-internal" title="PrimitiveType (pyiceberg.types.PrimitiveType)" href="#pyiceberg.types.PrimitiveType">PrimitiveType</a></code></p> |
| |
| |
| <p>A fixed data type in Iceberg.</p> |
| |
| |
| <details class="example" open> |
| <summary>Example</summary> |
| <blockquote> |
| <blockquote> |
| <blockquote> |
| <p>FixedType(8) |
| FixedType(length=8) |
| FixedType(8) == FixedType(8) |
| True |
| FixedType(19) == FixedType(25) |
| False</p> |
| </blockquote> |
| </blockquote> |
| </blockquote> |
| </details> |
| |
| |
| |
| |
| |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-206">206</a></span> |
| <span class="normal"><a href="#__codelineno-0-207">207</a></span> |
| <span class="normal"><a href="#__codelineno-0-208">208</a></span> |
| <span class="normal"><a href="#__codelineno-0-209">209</a></span> |
| <span class="normal"><a href="#__codelineno-0-210">210</a></span> |
| <span class="normal"><a href="#__codelineno-0-211">211</a></span> |
| <span class="normal"><a href="#__codelineno-0-212">212</a></span> |
| <span class="normal"><a href="#__codelineno-0-213">213</a></span> |
| <span class="normal"><a href="#__codelineno-0-214">214</a></span> |
| <span class="normal"><a href="#__codelineno-0-215">215</a></span> |
| <span class="normal"><a href="#__codelineno-0-216">216</a></span> |
| <span class="normal"><a href="#__codelineno-0-217">217</a></span> |
| <span class="normal"><a href="#__codelineno-0-218">218</a></span> |
| <span class="normal"><a href="#__codelineno-0-219">219</a></span> |
| <span class="normal"><a href="#__codelineno-0-220">220</a></span> |
| <span class="normal"><a href="#__codelineno-0-221">221</a></span> |
| <span class="normal"><a href="#__codelineno-0-222">222</a></span> |
| <span class="normal"><a href="#__codelineno-0-223">223</a></span> |
| <span class="normal"><a href="#__codelineno-0-224">224</a></span> |
| <span class="normal"><a href="#__codelineno-0-225">225</a></span> |
| <span class="normal"><a href="#__codelineno-0-226">226</a></span> |
| <span class="normal"><a href="#__codelineno-0-227">227</a></span> |
| <span class="normal"><a href="#__codelineno-0-228">228</a></span> |
| <span class="normal"><a href="#__codelineno-0-229">229</a></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></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-206" name="__codelineno-0-206"></a><span class="k">class</span><span class="w"> </span><span class="nc">FixedType</span><span class="p">(</span><span class="n">PrimitiveType</span><span class="p">):</span> |
| <a id="__codelineno-0-207" name="__codelineno-0-207"></a><span class="w"> </span><span class="sd">"""A fixed data type in Iceberg.</span> |
| <a id="__codelineno-0-208" name="__codelineno-0-208"></a> |
| <a id="__codelineno-0-209" name="__codelineno-0-209"></a><span class="sd"> Example:</span> |
| <a id="__codelineno-0-210" name="__codelineno-0-210"></a><span class="sd"> >>> FixedType(8)</span> |
| <a id="__codelineno-0-211" name="__codelineno-0-211"></a><span class="sd"> FixedType(length=8)</span> |
| <a id="__codelineno-0-212" name="__codelineno-0-212"></a><span class="sd"> >>> FixedType(8) == FixedType(8)</span> |
| <a id="__codelineno-0-213" name="__codelineno-0-213"></a><span class="sd"> True</span> |
| <a id="__codelineno-0-214" name="__codelineno-0-214"></a><span class="sd"> >>> FixedType(19) == FixedType(25)</span> |
| <a id="__codelineno-0-215" name="__codelineno-0-215"></a><span class="sd"> False</span> |
| <a id="__codelineno-0-216" name="__codelineno-0-216"></a><span class="sd"> """</span> |
| <a id="__codelineno-0-217" name="__codelineno-0-217"></a> |
| <a id="__codelineno-0-218" name="__codelineno-0-218"></a> <span class="n">root</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="n">Field</span><span class="p">()</span> |
| <a id="__codelineno-0-219" name="__codelineno-0-219"></a> |
| <a id="__codelineno-0-220" name="__codelineno-0-220"></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">length</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> |
| <a id="__codelineno-0-221" name="__codelineno-0-221"></a> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">root</span><span class="o">=</span><span class="n">length</span><span class="p">)</span> |
| <a id="__codelineno-0-222" name="__codelineno-0-222"></a> |
| <a id="__codelineno-0-223" name="__codelineno-0-223"></a> <span class="nd">@model_serializer</span> |
| <a id="__codelineno-0-224" name="__codelineno-0-224"></a> <span class="k">def</span><span class="w"> </span><span class="nf">ser_model</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> |
| <a id="__codelineno-0-225" name="__codelineno-0-225"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"fixed[</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">root</span><span class="si">}</span><span class="s2">]"</span> |
| <a id="__codelineno-0-226" name="__codelineno-0-226"></a> |
| <a id="__codelineno-0-227" name="__codelineno-0-227"></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">-></span> <span class="nb">int</span><span class="p">:</span> |
| <a id="__codelineno-0-228" name="__codelineno-0-228"></a><span class="w"> </span><span class="sd">"""Return the length of an instance of the FixedType class."""</span> |
| <a id="__codelineno-0-229" name="__codelineno-0-229"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">root</span> |
| <a id="__codelineno-0-230" name="__codelineno-0-230"></a> |
| <a id="__codelineno-0-231" name="__codelineno-0-231"></a> <span class="k">def</span><span class="w"> </span><span class="fm">__str__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> |
| <a id="__codelineno-0-232" name="__codelineno-0-232"></a><span class="w"> </span><span class="sd">"""Return the string representation."""</span> |
| <a id="__codelineno-0-233" name="__codelineno-0-233"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"fixed[</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">root</span><span class="si">}</span><span class="s2">]"</span> |
| <a id="__codelineno-0-234" name="__codelineno-0-234"></a> |
| <a id="__codelineno-0-235" name="__codelineno-0-235"></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">-></span> <span class="nb">str</span><span class="p">:</span> |
| <a id="__codelineno-0-236" name="__codelineno-0-236"></a><span class="w"> </span><span class="sd">"""Return the string representation of the FixedType class."""</span> |
| <a id="__codelineno-0-237" name="__codelineno-0-237"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"FixedType(length=</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">root</span><span class="si">}</span><span class="s2">)"</span> |
| <a id="__codelineno-0-238" name="__codelineno-0-238"></a> |
| <a id="__codelineno-0-239" name="__codelineno-0-239"></a> <span class="k">def</span><span class="w"> </span><span class="nf">__getnewargs__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">tuple</span><span class="p">[</span><span class="nb">int</span><span class="p">]:</span> |
| <a id="__codelineno-0-240" name="__codelineno-0-240"></a><span class="w"> </span><span class="sd">"""Pickle the FixedType class."""</span> |
| <a id="__codelineno-0-241" name="__codelineno-0-241"></a> <span class="k">return</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">root</span><span class="p">,)</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| |
| |
| |
| <div class="doc doc-children"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h3 id="pyiceberg.types.FixedType.__getnewargs__" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="n">__getnewargs__</span><span class="p">()</span></code> |
| |
| <a href="#pyiceberg.types.FixedType.__getnewargs__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Pickle the FixedType class.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-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></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-239" name="__codelineno-0-239"></a><span class="k">def</span><span class="w"> </span><span class="nf">__getnewargs__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">tuple</span><span class="p">[</span><span class="nb">int</span><span class="p">]:</span> |
| <a id="__codelineno-0-240" name="__codelineno-0-240"></a><span class="w"> </span><span class="sd">"""Pickle the FixedType class."""</span> |
| <a id="__codelineno-0-241" name="__codelineno-0-241"></a> <span class="k">return</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">root</span><span class="p">,)</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h3 id="pyiceberg.types.FixedType.__len__" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="fm">__len__</span><span class="p">()</span></code> |
| |
| <a href="#pyiceberg.types.FixedType.__len__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Return the length of an instance of the FixedType class.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-227">227</a></span> |
| <span class="normal"><a href="#__codelineno-0-228">228</a></span> |
| <span class="normal"><a href="#__codelineno-0-229">229</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-227" name="__codelineno-0-227"></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">-></span> <span class="nb">int</span><span class="p">:</span> |
| <a id="__codelineno-0-228" name="__codelineno-0-228"></a><span class="w"> </span><span class="sd">"""Return the length of an instance of the FixedType class."""</span> |
| <a id="__codelineno-0-229" name="__codelineno-0-229"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">root</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h3 id="pyiceberg.types.FixedType.__repr__" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="fm">__repr__</span><span class="p">()</span></code> |
| |
| <a href="#pyiceberg.types.FixedType.__repr__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Return the string representation of the FixedType class.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-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></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-235" name="__codelineno-0-235"></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">-></span> <span class="nb">str</span><span class="p">:</span> |
| <a id="__codelineno-0-236" name="__codelineno-0-236"></a><span class="w"> </span><span class="sd">"""Return the string representation of the FixedType class."""</span> |
| <a id="__codelineno-0-237" name="__codelineno-0-237"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"FixedType(length=</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">root</span><span class="si">}</span><span class="s2">)"</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h3 id="pyiceberg.types.FixedType.__str__" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="fm">__str__</span><span class="p">()</span></code> |
| |
| <a href="#pyiceberg.types.FixedType.__str__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Return the string representation.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-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></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-231" name="__codelineno-0-231"></a><span class="k">def</span><span class="w"> </span><span class="fm">__str__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> |
| <a id="__codelineno-0-232" name="__codelineno-0-232"></a><span class="w"> </span><span class="sd">"""Return the string representation."""</span> |
| <a id="__codelineno-0-233" name="__codelineno-0-233"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"fixed[</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">root</span><span class="si">}</span><span class="s2">]"</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| |
| |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-class"> |
| |
| |
| |
| <h2 id="pyiceberg.types.FloatType" class="doc doc-heading"> |
| <code>FloatType</code> |
| |
| |
| <a href="#pyiceberg.types.FloatType" class="headerlink" title="Permanent link">¶</a></h2> |
| |
| |
| <div class="doc doc-contents "> |
| <p class="doc doc-class-bases"> |
| Bases: <code><a class="autorefs autorefs-internal" title="PrimitiveType (pyiceberg.types.PrimitiveType)" href="#pyiceberg.types.PrimitiveType">PrimitiveType</a></code></p> |
| |
| |
| <p>A Float data type in Iceberg can be represented using an instance of this class.</p> |
| <p>Floats in Iceberg are 32-bit IEEE 754 floating points and can be promoted to Doubles.</p> |
| |
| |
| <details class="example" open> |
| <summary>Example</summary> |
| <blockquote> |
| <blockquote> |
| <blockquote> |
| <p>column_foo = FloatType() |
| isinstance(column_foo, FloatType) |
| True |
| column_foo |
| FloatType()</p> |
| </blockquote> |
| </blockquote> |
| </blockquote> |
| </details> |
| |
| <p><span class="doc-section-title">Attributes:</span></p> |
| <table> |
| <thead> |
| <tr> |
| <th>Name</th> |
| <th>Type</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr class="doc-section-item"> |
| <td><code><span title="pyiceberg.types.FloatType.max">max</span></code></td> |
| <td> |
| <code><span title="float">float</span></code> |
| </td> |
| <td> |
| <div class="doc-md-description"> |
| <p>The maximum allowed value for Floats, inherited from the canonical Iceberg implementation |
| in Java. (returns <code>3.4028235e38</code>)</p> |
| </div> |
| </td> |
| </tr> |
| <tr class="doc-section-item"> |
| <td><code><span title="pyiceberg.types.FloatType.min">min</span></code></td> |
| <td> |
| <code><span title="float">float</span></code> |
| </td> |
| <td> |
| <div class="doc-md-description"> |
| <p>The minimum allowed value for Floats, inherited from the canonical Iceberg implementation |
| in Java (returns <code>-3.4028235e38</code>)</p> |
| </div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| |
| |
| |
| |
| |
| |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-677">677</a></span> |
| <span class="normal"><a href="#__codelineno-0-678">678</a></span> |
| <span class="normal"><a href="#__codelineno-0-679">679</a></span> |
| <span class="normal"><a href="#__codelineno-0-680">680</a></span> |
| <span class="normal"><a href="#__codelineno-0-681">681</a></span> |
| <span class="normal"><a href="#__codelineno-0-682">682</a></span> |
| <span class="normal"><a href="#__codelineno-0-683">683</a></span> |
| <span class="normal"><a href="#__codelineno-0-684">684</a></span> |
| <span class="normal"><a href="#__codelineno-0-685">685</a></span> |
| <span class="normal"><a href="#__codelineno-0-686">686</a></span> |
| <span class="normal"><a href="#__codelineno-0-687">687</a></span> |
| <span class="normal"><a href="#__codelineno-0-688">688</a></span> |
| <span class="normal"><a href="#__codelineno-0-689">689</a></span> |
| <span class="normal"><a href="#__codelineno-0-690">690</a></span> |
| <span class="normal"><a href="#__codelineno-0-691">691</a></span> |
| <span class="normal"><a href="#__codelineno-0-692">692</a></span> |
| <span class="normal"><a href="#__codelineno-0-693">693</a></span> |
| <span class="normal"><a href="#__codelineno-0-694">694</a></span> |
| <span class="normal"><a href="#__codelineno-0-695">695</a></span> |
| <span class="normal"><a href="#__codelineno-0-696">696</a></span> |
| <span class="normal"><a href="#__codelineno-0-697">697</a></span> |
| <span class="normal"><a href="#__codelineno-0-698">698</a></span> |
| <span class="normal"><a href="#__codelineno-0-699">699</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-677" name="__codelineno-0-677"></a><span class="k">class</span><span class="w"> </span><span class="nc">FloatType</span><span class="p">(</span><span class="n">PrimitiveType</span><span class="p">):</span> |
| <a id="__codelineno-0-678" name="__codelineno-0-678"></a><span class="w"> </span><span class="sd">"""A Float data type in Iceberg can be represented using an instance of this class.</span> |
| <a id="__codelineno-0-679" name="__codelineno-0-679"></a> |
| <a id="__codelineno-0-680" name="__codelineno-0-680"></a><span class="sd"> Floats in Iceberg are 32-bit IEEE 754 floating points and can be promoted to Doubles.</span> |
| <a id="__codelineno-0-681" name="__codelineno-0-681"></a> |
| <a id="__codelineno-0-682" name="__codelineno-0-682"></a><span class="sd"> Example:</span> |
| <a id="__codelineno-0-683" name="__codelineno-0-683"></a><span class="sd"> >>> column_foo = FloatType()</span> |
| <a id="__codelineno-0-684" name="__codelineno-0-684"></a><span class="sd"> >>> isinstance(column_foo, FloatType)</span> |
| <a id="__codelineno-0-685" name="__codelineno-0-685"></a><span class="sd"> True</span> |
| <a id="__codelineno-0-686" name="__codelineno-0-686"></a><span class="sd"> >>> column_foo</span> |
| <a id="__codelineno-0-687" name="__codelineno-0-687"></a><span class="sd"> FloatType()</span> |
| <a id="__codelineno-0-688" name="__codelineno-0-688"></a> |
| <a id="__codelineno-0-689" name="__codelineno-0-689"></a><span class="sd"> Attributes:</span> |
| <a id="__codelineno-0-690" name="__codelineno-0-690"></a><span class="sd"> max (float): The maximum allowed value for Floats, inherited from the canonical Iceberg implementation</span> |
| <a id="__codelineno-0-691" name="__codelineno-0-691"></a><span class="sd"> in Java. (returns `3.4028235e38`)</span> |
| <a id="__codelineno-0-692" name="__codelineno-0-692"></a><span class="sd"> min (float): The minimum allowed value for Floats, inherited from the canonical Iceberg implementation</span> |
| <a id="__codelineno-0-693" name="__codelineno-0-693"></a><span class="sd"> in Java (returns `-3.4028235e38`)</span> |
| <a id="__codelineno-0-694" name="__codelineno-0-694"></a><span class="sd"> """</span> |
| <a id="__codelineno-0-695" name="__codelineno-0-695"></a> |
| <a id="__codelineno-0-696" name="__codelineno-0-696"></a> <span class="nb">max</span><span class="p">:</span> <span class="n">ClassVar</span><span class="p">[</span><span class="nb">float</span><span class="p">]</span> <span class="o">=</span> <span class="mf">3.4028235e38</span> |
| <a id="__codelineno-0-697" name="__codelineno-0-697"></a> <span class="nb">min</span><span class="p">:</span> <span class="n">ClassVar</span><span class="p">[</span><span class="nb">float</span><span class="p">]</span> <span class="o">=</span> <span class="o">-</span><span class="mf">3.4028235e38</span> |
| <a id="__codelineno-0-698" name="__codelineno-0-698"></a> |
| <a id="__codelineno-0-699" name="__codelineno-0-699"></a> <span class="n">root</span><span class="p">:</span> <span class="n">Literal</span><span class="p">[</span><span class="s2">"float"</span><span class="p">]</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"float"</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.types.IcebergType" class="doc doc-heading"> |
| <code>IcebergType</code> |
| |
| |
| <a href="#pyiceberg.types.IcebergType" class="headerlink" title="Permanent link">¶</a></h2> |
| |
| |
| <div class="doc doc-contents "> |
| <p class="doc doc-class-bases"> |
| Bases: <code><a class="autorefs autorefs-internal" title="IcebergBaseModel (pyiceberg.typedef.IcebergBaseModel)" href="../typedef/#pyiceberg.typedef.IcebergBaseModel">IcebergBaseModel</a></code></p> |
| |
| |
| <p>Base type for all Iceberg Types.</p> |
| |
| |
| <details class="example" open> |
| <summary>Example</summary> |
| <blockquote> |
| <blockquote> |
| <blockquote> |
| <p>str(IcebergType()) |
| 'IcebergType()' |
| repr(IcebergType()) |
| 'IcebergType()'</p> |
| </blockquote> |
| </blockquote> |
| </blockquote> |
| </details> |
| |
| |
| |
| |
| |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-114">114</a></span> |
| <span class="normal"><a href="#__codelineno-0-115">115</a></span> |
| <span class="normal"><a href="#__codelineno-0-116">116</a></span> |
| <span class="normal"><a href="#__codelineno-0-117">117</a></span> |
| <span class="normal"><a href="#__codelineno-0-118">118</a></span> |
| <span class="normal"><a href="#__codelineno-0-119">119</a></span> |
| <span class="normal"><a href="#__codelineno-0-120">120</a></span> |
| <span class="normal"><a href="#__codelineno-0-121">121</a></span> |
| <span class="normal"><a href="#__codelineno-0-122">122</a></span> |
| <span class="normal"><a href="#__codelineno-0-123">123</a></span> |
| <span class="normal"><a href="#__codelineno-0-124">124</a></span> |
| <span class="normal"><a href="#__codelineno-0-125">125</a></span> |
| <span class="normal"><a href="#__codelineno-0-126">126</a></span> |
| <span class="normal"><a href="#__codelineno-0-127">127</a></span> |
| <span class="normal"><a href="#__codelineno-0-128">128</a></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> |
| <span class="normal"><a href="#__codelineno-0-137">137</a></span> |
| <span class="normal"><a href="#__codelineno-0-138">138</a></span> |
| <span class="normal"><a href="#__codelineno-0-139">139</a></span> |
| <span class="normal"><a href="#__codelineno-0-140">140</a></span> |
| <span class="normal"><a href="#__codelineno-0-141">141</a></span> |
| <span class="normal"><a href="#__codelineno-0-142">142</a></span> |
| <span class="normal"><a href="#__codelineno-0-143">143</a></span> |
| <span class="normal"><a href="#__codelineno-0-144">144</a></span> |
| <span class="normal"><a href="#__codelineno-0-145">145</a></span> |
| <span class="normal"><a href="#__codelineno-0-146">146</a></span> |
| <span class="normal"><a href="#__codelineno-0-147">147</a></span> |
| <span class="normal"><a href="#__codelineno-0-148">148</a></span> |
| <span class="normal"><a href="#__codelineno-0-149">149</a></span> |
| <span class="normal"><a href="#__codelineno-0-150">150</a></span> |
| <span class="normal"><a href="#__codelineno-0-151">151</a></span> |
| <span class="normal"><a href="#__codelineno-0-152">152</a></span> |
| <span class="normal"><a href="#__codelineno-0-153">153</a></span> |
| <span class="normal"><a href="#__codelineno-0-154">154</a></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> |
| <span class="normal"><a href="#__codelineno-0-160">160</a></span> |
| <span class="normal"><a href="#__codelineno-0-161">161</a></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> |
| <span class="normal"><a href="#__codelineno-0-168">168</a></span> |
| <span class="normal"><a href="#__codelineno-0-169">169</a></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> |
| <span class="normal"><a href="#__codelineno-0-176">176</a></span> |
| <span class="normal"><a href="#__codelineno-0-177">177</a></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> |
| <span class="normal"><a href="#__codelineno-0-184">184</a></span> |
| <span class="normal"><a href="#__codelineno-0-185">185</a></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></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-114" name="__codelineno-0-114"></a><span class="k">class</span><span class="w"> </span><span class="nc">IcebergType</span><span class="p">(</span><span class="n">IcebergBaseModel</span><span class="p">):</span> |
| <a id="__codelineno-0-115" name="__codelineno-0-115"></a><span class="w"> </span><span class="sd">"""Base type for all Iceberg Types.</span> |
| <a id="__codelineno-0-116" name="__codelineno-0-116"></a> |
| <a id="__codelineno-0-117" name="__codelineno-0-117"></a><span class="sd"> Example:</span> |
| <a id="__codelineno-0-118" name="__codelineno-0-118"></a><span class="sd"> >>> str(IcebergType())</span> |
| <a id="__codelineno-0-119" name="__codelineno-0-119"></a><span class="sd"> 'IcebergType()'</span> |
| <a id="__codelineno-0-120" name="__codelineno-0-120"></a><span class="sd"> >>> repr(IcebergType())</span> |
| <a id="__codelineno-0-121" name="__codelineno-0-121"></a><span class="sd"> 'IcebergType()'</span> |
| <a id="__codelineno-0-122" name="__codelineno-0-122"></a><span class="sd"> """</span> |
| <a id="__codelineno-0-123" name="__codelineno-0-123"></a> |
| <a id="__codelineno-0-124" name="__codelineno-0-124"></a> <span class="nd">@model_validator</span><span class="p">(</span><span class="n">mode</span><span class="o">=</span><span class="s2">"wrap"</span><span class="p">)</span> |
| <a id="__codelineno-0-125" name="__codelineno-0-125"></a> <span class="nd">@classmethod</span> |
| <a id="__codelineno-0-126" name="__codelineno-0-126"></a> <span class="k">def</span><span class="w"> </span><span class="nf">handle_primitive_type</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">v</span><span class="p">:</span> <span class="n">Any</span><span class="p">,</span> <span class="n">handler</span><span class="p">:</span> <span class="n">ValidatorFunctionWrapHandler</span><span class="p">)</span> <span class="o">-></span> <span class="n">IcebergType</span><span class="p">:</span> |
| <a id="__codelineno-0-127" name="__codelineno-0-127"></a> <span class="c1"># Pydantic works mostly around dicts, and there seems to be something</span> |
| <a id="__codelineno-0-128" name="__codelineno-0-128"></a> <span class="c1"># by not serializing into a RootModel, might revisit this.</span> |
| <a id="__codelineno-0-129" name="__codelineno-0-129"></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="nb">str</span><span class="p">):</span> |
| <a id="__codelineno-0-130" name="__codelineno-0-130"></a> <span class="k">if</span> <span class="n">v</span> <span class="o">==</span> <span class="s2">"boolean"</span><span class="p">:</span> |
| <a id="__codelineno-0-131" name="__codelineno-0-131"></a> <span class="k">return</span> <span class="n">BooleanType</span><span class="p">()</span> |
| <a id="__codelineno-0-132" name="__codelineno-0-132"></a> <span class="k">elif</span> <span class="n">v</span> <span class="o">==</span> <span class="s2">"string"</span><span class="p">:</span> |
| <a id="__codelineno-0-133" name="__codelineno-0-133"></a> <span class="k">return</span> <span class="n">StringType</span><span class="p">()</span> |
| <a id="__codelineno-0-134" name="__codelineno-0-134"></a> <span class="k">elif</span> <span class="n">v</span> <span class="o">==</span> <span class="s2">"int"</span><span class="p">:</span> |
| <a id="__codelineno-0-135" name="__codelineno-0-135"></a> <span class="k">return</span> <span class="n">IntegerType</span><span class="p">()</span> |
| <a id="__codelineno-0-136" name="__codelineno-0-136"></a> <span class="k">elif</span> <span class="n">v</span> <span class="o">==</span> <span class="s2">"long"</span><span class="p">:</span> |
| <a id="__codelineno-0-137" name="__codelineno-0-137"></a> <span class="k">return</span> <span class="n">LongType</span><span class="p">()</span> |
| <a id="__codelineno-0-138" name="__codelineno-0-138"></a> <span class="k">if</span> <span class="n">v</span> <span class="o">==</span> <span class="s2">"float"</span><span class="p">:</span> |
| <a id="__codelineno-0-139" name="__codelineno-0-139"></a> <span class="k">return</span> <span class="n">FloatType</span><span class="p">()</span> |
| <a id="__codelineno-0-140" name="__codelineno-0-140"></a> <span class="k">if</span> <span class="n">v</span> <span class="o">==</span> <span class="s2">"double"</span><span class="p">:</span> |
| <a id="__codelineno-0-141" name="__codelineno-0-141"></a> <span class="k">return</span> <span class="n">DoubleType</span><span class="p">()</span> |
| <a id="__codelineno-0-142" name="__codelineno-0-142"></a> <span class="k">if</span> <span class="n">v</span> <span class="o">==</span> <span class="s2">"timestamp"</span><span class="p">:</span> |
| <a id="__codelineno-0-143" name="__codelineno-0-143"></a> <span class="k">return</span> <span class="n">TimestampType</span><span class="p">()</span> |
| <a id="__codelineno-0-144" name="__codelineno-0-144"></a> <span class="k">if</span> <span class="n">v</span> <span class="o">==</span> <span class="s2">"timestamptz"</span><span class="p">:</span> |
| <a id="__codelineno-0-145" name="__codelineno-0-145"></a> <span class="k">return</span> <span class="n">TimestamptzType</span><span class="p">()</span> |
| <a id="__codelineno-0-146" name="__codelineno-0-146"></a> <span class="k">if</span> <span class="n">v</span> <span class="o">==</span> <span class="s2">"timestamp_ns"</span><span class="p">:</span> |
| <a id="__codelineno-0-147" name="__codelineno-0-147"></a> <span class="k">return</span> <span class="n">TimestampNanoType</span><span class="p">()</span> |
| <a id="__codelineno-0-148" name="__codelineno-0-148"></a> <span class="k">if</span> <span class="n">v</span> <span class="o">==</span> <span class="s2">"timestamptz_ns"</span><span class="p">:</span> |
| <a id="__codelineno-0-149" name="__codelineno-0-149"></a> <span class="k">return</span> <span class="n">TimestamptzNanoType</span><span class="p">()</span> |
| <a id="__codelineno-0-150" name="__codelineno-0-150"></a> <span class="k">if</span> <span class="n">v</span> <span class="o">==</span> <span class="s2">"date"</span><span class="p">:</span> |
| <a id="__codelineno-0-151" name="__codelineno-0-151"></a> <span class="k">return</span> <span class="n">DateType</span><span class="p">()</span> |
| <a id="__codelineno-0-152" name="__codelineno-0-152"></a> <span class="k">if</span> <span class="n">v</span> <span class="o">==</span> <span class="s2">"time"</span><span class="p">:</span> |
| <a id="__codelineno-0-153" name="__codelineno-0-153"></a> <span class="k">return</span> <span class="n">TimeType</span><span class="p">()</span> |
| <a id="__codelineno-0-154" name="__codelineno-0-154"></a> <span class="k">if</span> <span class="n">v</span> <span class="o">==</span> <span class="s2">"uuid"</span><span class="p">:</span> |
| <a id="__codelineno-0-155" name="__codelineno-0-155"></a> <span class="k">return</span> <span class="n">UUIDType</span><span class="p">()</span> |
| <a id="__codelineno-0-156" name="__codelineno-0-156"></a> <span class="k">if</span> <span class="n">v</span> <span class="o">==</span> <span class="s2">"binary"</span><span class="p">:</span> |
| <a id="__codelineno-0-157" name="__codelineno-0-157"></a> <span class="k">return</span> <span class="n">BinaryType</span><span class="p">()</span> |
| <a id="__codelineno-0-158" name="__codelineno-0-158"></a> <span class="k">if</span> <span class="n">v</span> <span class="o">==</span> <span class="s2">"unknown"</span><span class="p">:</span> |
| <a id="__codelineno-0-159" name="__codelineno-0-159"></a> <span class="k">return</span> <span class="n">UnknownType</span><span class="p">()</span> |
| <a id="__codelineno-0-160" name="__codelineno-0-160"></a> <span class="k">if</span> <span class="n">v</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">"fixed"</span><span class="p">):</span> |
| <a id="__codelineno-0-161" name="__codelineno-0-161"></a> <span class="k">return</span> <span class="n">FixedType</span><span class="p">(</span><span class="n">_parse_fixed_type</span><span class="p">(</span><span class="n">v</span><span class="p">))</span> |
| <a id="__codelineno-0-162" name="__codelineno-0-162"></a> <span class="k">if</span> <span class="n">v</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">"decimal"</span><span class="p">):</span> |
| <a id="__codelineno-0-163" name="__codelineno-0-163"></a> <span class="n">precision</span><span class="p">,</span> <span class="n">scale</span> <span class="o">=</span> <span class="n">_parse_decimal_type</span><span class="p">(</span><span class="n">v</span><span class="p">)</span> |
| <a id="__codelineno-0-164" name="__codelineno-0-164"></a> <span class="k">return</span> <span class="n">DecimalType</span><span class="p">(</span><span class="n">precision</span><span class="p">,</span> <span class="n">scale</span><span class="p">)</span> |
| <a id="__codelineno-0-165" name="__codelineno-0-165"></a> <span class="k">else</span><span class="p">:</span> |
| <a id="__codelineno-0-166" name="__codelineno-0-166"></a> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Type not recognized: </span><span class="si">{</span><span class="n">v</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span> |
| <a id="__codelineno-0-167" name="__codelineno-0-167"></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="nb">dict</span><span class="p">)</span> <span class="ow">and</span> <span class="bp">cls</span> <span class="o">==</span> <span class="n">IcebergType</span><span class="p">:</span> |
| <a id="__codelineno-0-168" name="__codelineno-0-168"></a> <span class="n">complex_type</span> <span class="o">=</span> <span class="n">v</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"type"</span><span class="p">)</span> |
| <a id="__codelineno-0-169" name="__codelineno-0-169"></a> <span class="k">if</span> <span class="n">complex_type</span> <span class="o">==</span> <span class="s2">"list"</span><span class="p">:</span> |
| <a id="__codelineno-0-170" name="__codelineno-0-170"></a> <span class="k">return</span> <span class="n">ListType</span><span class="p">(</span><span class="o">**</span><span class="n">v</span><span class="p">)</span> |
| <a id="__codelineno-0-171" name="__codelineno-0-171"></a> <span class="k">elif</span> <span class="n">complex_type</span> <span class="o">==</span> <span class="s2">"map"</span><span class="p">:</span> |
| <a id="__codelineno-0-172" name="__codelineno-0-172"></a> <span class="k">return</span> <span class="n">MapType</span><span class="p">(</span><span class="o">**</span><span class="n">v</span><span class="p">)</span> |
| <a id="__codelineno-0-173" name="__codelineno-0-173"></a> <span class="k">elif</span> <span class="n">complex_type</span> <span class="o">==</span> <span class="s2">"struct"</span><span class="p">:</span> |
| <a id="__codelineno-0-174" name="__codelineno-0-174"></a> <span class="k">return</span> <span class="n">StructType</span><span class="p">(</span><span class="o">**</span><span class="n">v</span><span class="p">)</span> |
| <a id="__codelineno-0-175" name="__codelineno-0-175"></a> <span class="k">else</span><span class="p">:</span> |
| <a id="__codelineno-0-176" name="__codelineno-0-176"></a> <span class="k">return</span> <span class="n">NestedField</span><span class="p">(</span><span class="o">**</span><span class="n">v</span><span class="p">)</span> |
| <a id="__codelineno-0-177" name="__codelineno-0-177"></a> <span class="k">return</span> <span class="n">handler</span><span class="p">(</span><span class="n">v</span><span class="p">)</span> |
| <a id="__codelineno-0-178" name="__codelineno-0-178"></a> |
| <a id="__codelineno-0-179" name="__codelineno-0-179"></a> <span class="nd">@property</span> |
| <a id="__codelineno-0-180" name="__codelineno-0-180"></a> <span class="k">def</span><span class="w"> </span><span class="nf">is_primitive</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">bool</span><span class="p">:</span> |
| <a id="__codelineno-0-181" name="__codelineno-0-181"></a> <span class="k">return</span> <span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">PrimitiveType</span><span class="p">)</span> |
| <a id="__codelineno-0-182" name="__codelineno-0-182"></a> |
| <a id="__codelineno-0-183" name="__codelineno-0-183"></a> <span class="nd">@property</span> |
| <a id="__codelineno-0-184" name="__codelineno-0-184"></a> <span class="k">def</span><span class="w"> </span><span class="nf">is_struct</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">bool</span><span class="p">:</span> |
| <a id="__codelineno-0-185" name="__codelineno-0-185"></a> <span class="k">return</span> <span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">StructType</span><span class="p">)</span> |
| <a id="__codelineno-0-186" name="__codelineno-0-186"></a> |
| <a id="__codelineno-0-187" name="__codelineno-0-187"></a> <span class="k">def</span><span class="w"> </span><span class="nf">minimum_format_version</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">TableVersion</span><span class="p">:</span> |
| <a id="__codelineno-0-188" name="__codelineno-0-188"></a><span class="w"> </span><span class="sd">"""Minimum Iceberg format version after which this type is supported."""</span> |
| <a id="__codelineno-0-189" name="__codelineno-0-189"></a> <span class="k">return</span> <span class="mi">1</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| |
| |
| |
| <div class="doc doc-children"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h3 id="pyiceberg.types.IcebergType.minimum_format_version" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="n">minimum_format_version</span><span class="p">()</span></code> |
| |
| <a href="#pyiceberg.types.IcebergType.minimum_format_version" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Minimum Iceberg format version after which this type is supported.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-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></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-187" name="__codelineno-0-187"></a><span class="k">def</span><span class="w"> </span><span class="nf">minimum_format_version</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">TableVersion</span><span class="p">:</span> |
| <a id="__codelineno-0-188" name="__codelineno-0-188"></a><span class="w"> </span><span class="sd">"""Minimum Iceberg format version after which this type is supported."""</span> |
| <a id="__codelineno-0-189" name="__codelineno-0-189"></a> <span class="k">return</span> <span class="mi">1</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| |
| |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-class"> |
| |
| |
| |
| <h2 id="pyiceberg.types.IntegerType" class="doc doc-heading"> |
| <code>IntegerType</code> |
| |
| |
| <a href="#pyiceberg.types.IntegerType" class="headerlink" title="Permanent link">¶</a></h2> |
| |
| |
| <div class="doc doc-contents "> |
| <p class="doc doc-class-bases"> |
| Bases: <code><a class="autorefs autorefs-internal" title="PrimitiveType (pyiceberg.types.PrimitiveType)" href="#pyiceberg.types.PrimitiveType">PrimitiveType</a></code></p> |
| |
| |
| <p>An Integer data type in Iceberg can be represented using an instance of this class.</p> |
| <p>Integers in Iceberg are 32-bit signed and can be promoted to Longs.</p> |
| |
| |
| <details class="example" open> |
| <summary>Example</summary> |
| <blockquote> |
| <blockquote> |
| <blockquote> |
| <p>column_foo = IntegerType() |
| isinstance(column_foo, IntegerType) |
| True</p> |
| </blockquote> |
| </blockquote> |
| </blockquote> |
| </details> |
| |
| <p><span class="doc-section-title">Attributes:</span></p> |
| <table> |
| <thead> |
| <tr> |
| <th>Name</th> |
| <th>Type</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr class="doc-section-item"> |
| <td><code><span title="pyiceberg.types.IntegerType.max">max</span></code></td> |
| <td> |
| <code><span title="int">int</span></code> |
| </td> |
| <td> |
| <div class="doc-md-description"> |
| <p>The maximum allowed value for Integers, inherited from the canonical Iceberg implementation |
| in Java (returns <code>2147483647</code>)</p> |
| </div> |
| </td> |
| </tr> |
| <tr class="doc-section-item"> |
| <td><code><span title="pyiceberg.types.IntegerType.min">min</span></code></td> |
| <td> |
| <code><span title="int">int</span></code> |
| </td> |
| <td> |
| <div class="doc-md-description"> |
| <p>The minimum allowed value for Integers, inherited from the canonical Iceberg implementation |
| in Java (returns <code>-2147483648</code>)</p> |
| </div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| |
| |
| |
| |
| |
| |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-627">627</a></span> |
| <span class="normal"><a href="#__codelineno-0-628">628</a></span> |
| <span class="normal"><a href="#__codelineno-0-629">629</a></span> |
| <span class="normal"><a href="#__codelineno-0-630">630</a></span> |
| <span class="normal"><a href="#__codelineno-0-631">631</a></span> |
| <span class="normal"><a href="#__codelineno-0-632">632</a></span> |
| <span class="normal"><a href="#__codelineno-0-633">633</a></span> |
| <span class="normal"><a href="#__codelineno-0-634">634</a></span> |
| <span class="normal"><a href="#__codelineno-0-635">635</a></span> |
| <span class="normal"><a href="#__codelineno-0-636">636</a></span> |
| <span class="normal"><a href="#__codelineno-0-637">637</a></span> |
| <span class="normal"><a href="#__codelineno-0-638">638</a></span> |
| <span class="normal"><a href="#__codelineno-0-639">639</a></span> |
| <span class="normal"><a href="#__codelineno-0-640">640</a></span> |
| <span class="normal"><a href="#__codelineno-0-641">641</a></span> |
| <span class="normal"><a href="#__codelineno-0-642">642</a></span> |
| <span class="normal"><a href="#__codelineno-0-643">643</a></span> |
| <span class="normal"><a href="#__codelineno-0-644">644</a></span> |
| <span class="normal"><a href="#__codelineno-0-645">645</a></span> |
| <span class="normal"><a href="#__codelineno-0-646">646</a></span> |
| <span class="normal"><a href="#__codelineno-0-647">647</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-627" name="__codelineno-0-627"></a><span class="k">class</span><span class="w"> </span><span class="nc">IntegerType</span><span class="p">(</span><span class="n">PrimitiveType</span><span class="p">):</span> |
| <a id="__codelineno-0-628" name="__codelineno-0-628"></a><span class="w"> </span><span class="sd">"""An Integer data type in Iceberg can be represented using an instance of this class.</span> |
| <a id="__codelineno-0-629" name="__codelineno-0-629"></a> |
| <a id="__codelineno-0-630" name="__codelineno-0-630"></a><span class="sd"> Integers in Iceberg are 32-bit signed and can be promoted to Longs.</span> |
| <a id="__codelineno-0-631" name="__codelineno-0-631"></a> |
| <a id="__codelineno-0-632" name="__codelineno-0-632"></a><span class="sd"> Example:</span> |
| <a id="__codelineno-0-633" name="__codelineno-0-633"></a><span class="sd"> >>> column_foo = IntegerType()</span> |
| <a id="__codelineno-0-634" name="__codelineno-0-634"></a><span class="sd"> >>> isinstance(column_foo, IntegerType)</span> |
| <a id="__codelineno-0-635" name="__codelineno-0-635"></a><span class="sd"> True</span> |
| <a id="__codelineno-0-636" name="__codelineno-0-636"></a> |
| <a id="__codelineno-0-637" name="__codelineno-0-637"></a><span class="sd"> Attributes:</span> |
| <a id="__codelineno-0-638" name="__codelineno-0-638"></a><span class="sd"> max (int): The maximum allowed value for Integers, inherited from the canonical Iceberg implementation</span> |
| <a id="__codelineno-0-639" name="__codelineno-0-639"></a><span class="sd"> in Java (returns `2147483647`)</span> |
| <a id="__codelineno-0-640" name="__codelineno-0-640"></a><span class="sd"> min (int): The minimum allowed value for Integers, inherited from the canonical Iceberg implementation</span> |
| <a id="__codelineno-0-641" name="__codelineno-0-641"></a><span class="sd"> in Java (returns `-2147483648`)</span> |
| <a id="__codelineno-0-642" name="__codelineno-0-642"></a><span class="sd"> """</span> |
| <a id="__codelineno-0-643" name="__codelineno-0-643"></a> |
| <a id="__codelineno-0-644" name="__codelineno-0-644"></a> <span class="n">root</span><span class="p">:</span> <span class="n">Literal</span><span class="p">[</span><span class="s2">"int"</span><span class="p">]</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"int"</span><span class="p">)</span> |
| <a id="__codelineno-0-645" name="__codelineno-0-645"></a> |
| <a id="__codelineno-0-646" name="__codelineno-0-646"></a> <span class="nb">max</span><span class="p">:</span> <span class="n">ClassVar</span><span class="p">[</span><span class="nb">int</span><span class="p">]</span> <span class="o">=</span> <span class="mi">2147483647</span> |
| <a id="__codelineno-0-647" name="__codelineno-0-647"></a> <span class="nb">min</span><span class="p">:</span> <span class="n">ClassVar</span><span class="p">[</span><span class="nb">int</span><span class="p">]</span> <span class="o">=</span> <span class="o">-</span><span class="mi">2147483648</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.types.ListType" class="doc doc-heading"> |
| <code>ListType</code> |
| |
| |
| <a href="#pyiceberg.types.ListType" class="headerlink" title="Permanent link">¶</a></h2> |
| |
| |
| <div class="doc doc-contents "> |
| <p class="doc doc-class-bases"> |
| Bases: <code><a class="autorefs autorefs-internal" title="IcebergType (pyiceberg.types.IcebergType)" href="#pyiceberg.types.IcebergType">IcebergType</a></code></p> |
| |
| |
| <p>A list type in Iceberg.</p> |
| |
| |
| <details class="example" open> |
| <summary>Example</summary> |
| <blockquote> |
| <blockquote> |
| <blockquote> |
| <p>ListType(element_id=3, element_type=StringType(), element_required=True) |
| ListType(element_id=3, element_type=StringType(), element_required=True)</p> |
| </blockquote> |
| </blockquote> |
| </blockquote> |
| </details> |
| |
| |
| |
| |
| |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-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> |
| <span class="normal"><a href="#__codelineno-0-519">519</a></span> |
| <span class="normal"><a href="#__codelineno-0-520">520</a></span> |
| <span class="normal"><a href="#__codelineno-0-521">521</a></span> |
| <span class="normal"><a href="#__codelineno-0-522">522</a></span> |
| <span class="normal"><a href="#__codelineno-0-523">523</a></span> |
| <span class="normal"><a href="#__codelineno-0-524">524</a></span> |
| <span class="normal"><a href="#__codelineno-0-525">525</a></span> |
| <span class="normal"><a href="#__codelineno-0-526">526</a></span> |
| <span class="normal"><a href="#__codelineno-0-527">527</a></span> |
| <span class="normal"><a href="#__codelineno-0-528">528</a></span> |
| <span class="normal"><a href="#__codelineno-0-529">529</a></span> |
| <span class="normal"><a href="#__codelineno-0-530">530</a></span> |
| <span class="normal"><a href="#__codelineno-0-531">531</a></span> |
| <span class="normal"><a href="#__codelineno-0-532">532</a></span> |
| <span class="normal"><a href="#__codelineno-0-533">533</a></span> |
| <span class="normal"><a href="#__codelineno-0-534">534</a></span> |
| <span class="normal"><a href="#__codelineno-0-535">535</a></span> |
| <span class="normal"><a href="#__codelineno-0-536">536</a></span> |
| <span class="normal"><a href="#__codelineno-0-537">537</a></span> |
| <span class="normal"><a href="#__codelineno-0-538">538</a></span> |
| <span class="normal"><a href="#__codelineno-0-539">539</a></span> |
| <span class="normal"><a href="#__codelineno-0-540">540</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-493" name="__codelineno-0-493"></a><span class="k">class</span><span class="w"> </span><span class="nc">ListType</span><span class="p">(</span><span class="n">IcebergType</span><span class="p">):</span> |
| <a id="__codelineno-0-494" name="__codelineno-0-494"></a><span class="w"> </span><span class="sd">"""A list type in Iceberg.</span> |
| <a id="__codelineno-0-495" name="__codelineno-0-495"></a> |
| <a id="__codelineno-0-496" name="__codelineno-0-496"></a><span class="sd"> Example:</span> |
| <a id="__codelineno-0-497" name="__codelineno-0-497"></a><span class="sd"> >>> ListType(element_id=3, element_type=StringType(), element_required=True)</span> |
| <a id="__codelineno-0-498" name="__codelineno-0-498"></a><span class="sd"> ListType(element_id=3, element_type=StringType(), element_required=True)</span> |
| <a id="__codelineno-0-499" name="__codelineno-0-499"></a><span class="sd"> """</span> |
| <a id="__codelineno-0-500" name="__codelineno-0-500"></a> |
| <a id="__codelineno-0-501" name="__codelineno-0-501"></a> <span class="nb">type</span><span class="p">:</span> <span class="n">Literal</span><span class="p">[</span><span class="s2">"list"</span><span class="p">]</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"list"</span><span class="p">)</span> |
| <a id="__codelineno-0-502" name="__codelineno-0-502"></a> <span class="n">element_id</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">alias</span><span class="o">=</span><span class="s2">"element-id"</span><span class="p">)</span> |
| <a id="__codelineno-0-503" name="__codelineno-0-503"></a> <span class="n">element_type</span><span class="p">:</span> <span class="n">SerializeAsAny</span><span class="p">[</span><span class="n">IcebergType</span><span class="p">]</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">alias</span><span class="o">=</span><span class="s2">"element"</span><span class="p">)</span> |
| <a id="__codelineno-0-504" name="__codelineno-0-504"></a> <span class="n">element_required</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">alias</span><span class="o">=</span><span class="s2">"element-required"</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> |
| <a id="__codelineno-0-505" name="__codelineno-0-505"></a> <span class="n">_element_field</span><span class="p">:</span> <span class="n">NestedField</span> <span class="o">=</span> <span class="n">PrivateAttr</span><span class="p">()</span> |
| <a id="__codelineno-0-506" name="__codelineno-0-506"></a> <span class="n">_hash</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="n">PrivateAttr</span><span class="p">()</span> |
| <a id="__codelineno-0-507" name="__codelineno-0-507"></a> |
| <a id="__codelineno-0-508" name="__codelineno-0-508"></a> <span class="k">def</span><span class="w"> </span><span class="fm">__init__</span><span class="p">(</span> |
| <a id="__codelineno-0-509" name="__codelineno-0-509"></a> <span class="bp">self</span><span class="p">,</span> <span class="n">element_id</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="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="n">element</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">IcebergType</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="n">element_required</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">,</span> <span class="o">**</span><span class="n">data</span><span class="p">:</span> <span class="n">Any</span> |
| <a id="__codelineno-0-510" name="__codelineno-0-510"></a> <span class="p">):</span> |
| <a id="__codelineno-0-511" name="__codelineno-0-511"></a> <span class="n">data</span><span class="p">[</span><span class="s2">"element-id"</span><span class="p">]</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="s2">"element-id"</span><span class="p">]</span> <span class="k">if</span> <span class="s2">"element-id"</span> <span class="ow">in</span> <span class="n">data</span> <span class="k">else</span> <span class="n">element_id</span> |
| <a id="__codelineno-0-512" name="__codelineno-0-512"></a> <span class="n">data</span><span class="p">[</span><span class="s2">"element"</span><span class="p">]</span> <span class="o">=</span> <span class="n">element</span> <span class="ow">or</span> <span class="n">data</span><span class="p">[</span><span class="s2">"element_type"</span><span class="p">]</span> |
| <a id="__codelineno-0-513" name="__codelineno-0-513"></a> <span class="n">data</span><span class="p">[</span><span class="s2">"element-required"</span><span class="p">]</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="s2">"element-required"</span><span class="p">]</span> <span class="k">if</span> <span class="s2">"element-required"</span> <span class="ow">in</span> <span class="n">data</span> <span class="k">else</span> <span class="n">element_required</span> |
| <a id="__codelineno-0-514" name="__codelineno-0-514"></a> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="o">**</span><span class="n">data</span><span class="p">)</span> |
| <a id="__codelineno-0-515" name="__codelineno-0-515"></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="n">data</span><span class="o">.</span><span class="n">values</span><span class="p">())</span> |
| <a id="__codelineno-0-516" name="__codelineno-0-516"></a> |
| <a id="__codelineno-0-517" name="__codelineno-0-517"></a> <span class="nd">@cached_property</span> |
| <a id="__codelineno-0-518" name="__codelineno-0-518"></a> <span class="k">def</span><span class="w"> </span><span class="nf">element_field</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">NestedField</span><span class="p">:</span> |
| <a id="__codelineno-0-519" name="__codelineno-0-519"></a> <span class="k">return</span> <span class="n">NestedField</span><span class="p">(</span> |
| <a id="__codelineno-0-520" name="__codelineno-0-520"></a> <span class="n">name</span><span class="o">=</span><span class="s2">"element"</span><span class="p">,</span> |
| <a id="__codelineno-0-521" name="__codelineno-0-521"></a> <span class="n">field_id</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">element_id</span><span class="p">,</span> |
| <a id="__codelineno-0-522" name="__codelineno-0-522"></a> <span class="n">field_type</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">element_type</span><span class="p">,</span> |
| <a id="__codelineno-0-523" name="__codelineno-0-523"></a> <span class="n">required</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">element_required</span><span class="p">,</span> |
| <a id="__codelineno-0-524" name="__codelineno-0-524"></a> <span class="p">)</span> |
| <a id="__codelineno-0-525" name="__codelineno-0-525"></a> |
| <a id="__codelineno-0-526" name="__codelineno-0-526"></a> <span class="k">def</span><span class="w"> </span><span class="fm">__str__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> |
| <a id="__codelineno-0-527" name="__codelineno-0-527"></a><span class="w"> </span><span class="sd">"""Return the string representation of the ListType class."""</span> |
| <a id="__codelineno-0-528" name="__codelineno-0-528"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"list<</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">element_type</span><span class="si">}</span><span class="s2">>"</span> |
| <a id="__codelineno-0-529" name="__codelineno-0-529"></a> |
| <a id="__codelineno-0-530" name="__codelineno-0-530"></a> <span class="k">def</span><span class="w"> </span><span class="nf">__getnewargs__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">Tuple</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="n">IcebergType</span><span class="p">,</span> <span class="nb">bool</span><span class="p">]:</span> |
| <a id="__codelineno-0-531" name="__codelineno-0-531"></a><span class="w"> </span><span class="sd">"""Pickle the ListType class."""</span> |
| <a id="__codelineno-0-532" name="__codelineno-0-532"></a> <span class="k">return</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">element_id</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">element_type</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">element_required</span><span class="p">)</span> |
| <a id="__codelineno-0-533" name="__codelineno-0-533"></a> |
| <a id="__codelineno-0-534" name="__codelineno-0-534"></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">-></span> <span class="nb">int</span><span class="p">:</span> |
| <a id="__codelineno-0-535" name="__codelineno-0-535"></a><span class="w"> </span><span class="sd">"""Use the cache hash value of the StructType class."""</span> |
| <a id="__codelineno-0-536" name="__codelineno-0-536"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_hash</span> |
| <a id="__codelineno-0-537" name="__codelineno-0-537"></a> |
| <a id="__codelineno-0-538" name="__codelineno-0-538"></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">-></span> <span class="nb">bool</span><span class="p">:</span> |
| <a id="__codelineno-0-539" name="__codelineno-0-539"></a><span class="w"> </span><span class="sd">"""Compare the list type to another list type."""</span> |
| <a id="__codelineno-0-540" name="__codelineno-0-540"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">element_field</span> <span class="o">==</span> <span class="n">other</span><span class="o">.</span><span class="n">element_field</span> <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">ListType</span><span class="p">)</span> <span class="k">else</span> <span class="kc">False</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| |
| |
| |
| <div class="doc doc-children"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h3 id="pyiceberg.types.ListType.__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.types.ListType.__eq__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Compare the list type to another list type.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-538">538</a></span> |
| <span class="normal"><a href="#__codelineno-0-539">539</a></span> |
| <span class="normal"><a href="#__codelineno-0-540">540</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-538" name="__codelineno-0-538"></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">-></span> <span class="nb">bool</span><span class="p">:</span> |
| <a id="__codelineno-0-539" name="__codelineno-0-539"></a><span class="w"> </span><span class="sd">"""Compare the list type to another list type."""</span> |
| <a id="__codelineno-0-540" name="__codelineno-0-540"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">element_field</span> <span class="o">==</span> <span class="n">other</span><span class="o">.</span><span class="n">element_field</span> <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">ListType</span><span class="p">)</span> <span class="k">else</span> <span class="kc">False</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h3 id="pyiceberg.types.ListType.__getnewargs__" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="n">__getnewargs__</span><span class="p">()</span></code> |
| |
| <a href="#pyiceberg.types.ListType.__getnewargs__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Pickle the ListType class.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-530">530</a></span> |
| <span class="normal"><a href="#__codelineno-0-531">531</a></span> |
| <span class="normal"><a href="#__codelineno-0-532">532</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-530" name="__codelineno-0-530"></a><span class="k">def</span><span class="w"> </span><span class="nf">__getnewargs__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">Tuple</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="n">IcebergType</span><span class="p">,</span> <span class="nb">bool</span><span class="p">]:</span> |
| <a id="__codelineno-0-531" name="__codelineno-0-531"></a><span class="w"> </span><span class="sd">"""Pickle the ListType class."""</span> |
| <a id="__codelineno-0-532" name="__codelineno-0-532"></a> <span class="k">return</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">element_id</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">element_type</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">element_required</span><span class="p">)</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h3 id="pyiceberg.types.ListType.__hash__" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="fm">__hash__</span><span class="p">()</span></code> |
| |
| <a href="#pyiceberg.types.ListType.__hash__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Use the cache hash value of the StructType class.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-534">534</a></span> |
| <span class="normal"><a href="#__codelineno-0-535">535</a></span> |
| <span class="normal"><a href="#__codelineno-0-536">536</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-534" name="__codelineno-0-534"></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">-></span> <span class="nb">int</span><span class="p">:</span> |
| <a id="__codelineno-0-535" name="__codelineno-0-535"></a><span class="w"> </span><span class="sd">"""Use the cache hash value of the StructType class."""</span> |
| <a id="__codelineno-0-536" name="__codelineno-0-536"></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.types.ListType.__str__" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="fm">__str__</span><span class="p">()</span></code> |
| |
| <a href="#pyiceberg.types.ListType.__str__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Return the string representation of the ListType class.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-526">526</a></span> |
| <span class="normal"><a href="#__codelineno-0-527">527</a></span> |
| <span class="normal"><a href="#__codelineno-0-528">528</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-526" name="__codelineno-0-526"></a><span class="k">def</span><span class="w"> </span><span class="fm">__str__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> |
| <a id="__codelineno-0-527" name="__codelineno-0-527"></a><span class="w"> </span><span class="sd">"""Return the string representation of the ListType class."""</span> |
| <a id="__codelineno-0-528" name="__codelineno-0-528"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"list<</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">element_type</span><span class="si">}</span><span class="s2">>"</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| |
| |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-class"> |
| |
| |
| |
| <h2 id="pyiceberg.types.LongType" class="doc doc-heading"> |
| <code>LongType</code> |
| |
| |
| <a href="#pyiceberg.types.LongType" class="headerlink" title="Permanent link">¶</a></h2> |
| |
| |
| <div class="doc doc-contents "> |
| <p class="doc doc-class-bases"> |
| Bases: <code><a class="autorefs autorefs-internal" title="PrimitiveType (pyiceberg.types.PrimitiveType)" href="#pyiceberg.types.PrimitiveType">PrimitiveType</a></code></p> |
| |
| |
| <p>A Long data type in Iceberg can be represented using an instance of this class.</p> |
| <p>Longs in Iceberg are 64-bit signed integers.</p> |
| |
| |
| <details class="example" open> |
| <summary>Example</summary> |
| <blockquote> |
| <blockquote> |
| <blockquote> |
| <p>column_foo = LongType() |
| isinstance(column_foo, LongType) |
| True |
| column_foo |
| LongType() |
| str(column_foo) |
| 'long'</p> |
| </blockquote> |
| </blockquote> |
| </blockquote> |
| </details> |
| |
| <p><span class="doc-section-title">Attributes:</span></p> |
| <table> |
| <thead> |
| <tr> |
| <th>Name</th> |
| <th>Type</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr class="doc-section-item"> |
| <td><code><span title="pyiceberg.types.LongType.max">max</span></code></td> |
| <td> |
| <code><span title="int">int</span></code> |
| </td> |
| <td> |
| <div class="doc-md-description"> |
| <p>The maximum allowed value for Longs, inherited from the canonical Iceberg implementation |
| in Java. (returns <code>9223372036854775807</code>)</p> |
| </div> |
| </td> |
| </tr> |
| <tr class="doc-section-item"> |
| <td><code><span title="pyiceberg.types.LongType.min">min</span></code></td> |
| <td> |
| <code><span title="int">int</span></code> |
| </td> |
| <td> |
| <div class="doc-md-description"> |
| <p>The minimum allowed value for Longs, inherited from the canonical Iceberg implementation |
| in Java (returns <code>-9223372036854775808</code>)</p> |
| </div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| |
| |
| |
| |
| |
| |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-650">650</a></span> |
| <span class="normal"><a href="#__codelineno-0-651">651</a></span> |
| <span class="normal"><a href="#__codelineno-0-652">652</a></span> |
| <span class="normal"><a href="#__codelineno-0-653">653</a></span> |
| <span class="normal"><a href="#__codelineno-0-654">654</a></span> |
| <span class="normal"><a href="#__codelineno-0-655">655</a></span> |
| <span class="normal"><a href="#__codelineno-0-656">656</a></span> |
| <span class="normal"><a href="#__codelineno-0-657">657</a></span> |
| <span class="normal"><a href="#__codelineno-0-658">658</a></span> |
| <span class="normal"><a href="#__codelineno-0-659">659</a></span> |
| <span class="normal"><a href="#__codelineno-0-660">660</a></span> |
| <span class="normal"><a href="#__codelineno-0-661">661</a></span> |
| <span class="normal"><a href="#__codelineno-0-662">662</a></span> |
| <span class="normal"><a href="#__codelineno-0-663">663</a></span> |
| <span class="normal"><a href="#__codelineno-0-664">664</a></span> |
| <span class="normal"><a href="#__codelineno-0-665">665</a></span> |
| <span class="normal"><a href="#__codelineno-0-666">666</a></span> |
| <span class="normal"><a href="#__codelineno-0-667">667</a></span> |
| <span class="normal"><a href="#__codelineno-0-668">668</a></span> |
| <span class="normal"><a href="#__codelineno-0-669">669</a></span> |
| <span class="normal"><a href="#__codelineno-0-670">670</a></span> |
| <span class="normal"><a href="#__codelineno-0-671">671</a></span> |
| <span class="normal"><a href="#__codelineno-0-672">672</a></span> |
| <span class="normal"><a href="#__codelineno-0-673">673</a></span> |
| <span class="normal"><a href="#__codelineno-0-674">674</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-650" name="__codelineno-0-650"></a><span class="k">class</span><span class="w"> </span><span class="nc">LongType</span><span class="p">(</span><span class="n">PrimitiveType</span><span class="p">):</span> |
| <a id="__codelineno-0-651" name="__codelineno-0-651"></a><span class="w"> </span><span class="sd">"""A Long data type in Iceberg can be represented using an instance of this class.</span> |
| <a id="__codelineno-0-652" name="__codelineno-0-652"></a> |
| <a id="__codelineno-0-653" name="__codelineno-0-653"></a><span class="sd"> Longs in Iceberg are 64-bit signed integers.</span> |
| <a id="__codelineno-0-654" name="__codelineno-0-654"></a> |
| <a id="__codelineno-0-655" name="__codelineno-0-655"></a><span class="sd"> Example:</span> |
| <a id="__codelineno-0-656" name="__codelineno-0-656"></a><span class="sd"> >>> column_foo = LongType()</span> |
| <a id="__codelineno-0-657" name="__codelineno-0-657"></a><span class="sd"> >>> isinstance(column_foo, LongType)</span> |
| <a id="__codelineno-0-658" name="__codelineno-0-658"></a><span class="sd"> True</span> |
| <a id="__codelineno-0-659" name="__codelineno-0-659"></a><span class="sd"> >>> column_foo</span> |
| <a id="__codelineno-0-660" name="__codelineno-0-660"></a><span class="sd"> LongType()</span> |
| <a id="__codelineno-0-661" name="__codelineno-0-661"></a><span class="sd"> >>> str(column_foo)</span> |
| <a id="__codelineno-0-662" name="__codelineno-0-662"></a><span class="sd"> 'long'</span> |
| <a id="__codelineno-0-663" name="__codelineno-0-663"></a> |
| <a id="__codelineno-0-664" name="__codelineno-0-664"></a><span class="sd"> Attributes:</span> |
| <a id="__codelineno-0-665" name="__codelineno-0-665"></a><span class="sd"> max (int): The maximum allowed value for Longs, inherited from the canonical Iceberg implementation</span> |
| <a id="__codelineno-0-666" name="__codelineno-0-666"></a><span class="sd"> in Java. (returns `9223372036854775807`)</span> |
| <a id="__codelineno-0-667" name="__codelineno-0-667"></a><span class="sd"> min (int): The minimum allowed value for Longs, inherited from the canonical Iceberg implementation</span> |
| <a id="__codelineno-0-668" name="__codelineno-0-668"></a><span class="sd"> in Java (returns `-9223372036854775808`)</span> |
| <a id="__codelineno-0-669" name="__codelineno-0-669"></a><span class="sd"> """</span> |
| <a id="__codelineno-0-670" name="__codelineno-0-670"></a> |
| <a id="__codelineno-0-671" name="__codelineno-0-671"></a> <span class="n">root</span><span class="p">:</span> <span class="n">Literal</span><span class="p">[</span><span class="s2">"long"</span><span class="p">]</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"long"</span><span class="p">)</span> |
| <a id="__codelineno-0-672" name="__codelineno-0-672"></a> |
| <a id="__codelineno-0-673" name="__codelineno-0-673"></a> <span class="nb">max</span><span class="p">:</span> <span class="n">ClassVar</span><span class="p">[</span><span class="nb">int</span><span class="p">]</span> <span class="o">=</span> <span class="mi">9223372036854775807</span> |
| <a id="__codelineno-0-674" name="__codelineno-0-674"></a> <span class="nb">min</span><span class="p">:</span> <span class="n">ClassVar</span><span class="p">[</span><span class="nb">int</span><span class="p">]</span> <span class="o">=</span> <span class="o">-</span><span class="mi">9223372036854775808</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.types.MapType" class="doc doc-heading"> |
| <code>MapType</code> |
| |
| |
| <a href="#pyiceberg.types.MapType" class="headerlink" title="Permanent link">¶</a></h2> |
| |
| |
| <div class="doc doc-contents "> |
| <p class="doc doc-class-bases"> |
| Bases: <code><a class="autorefs autorefs-internal" title="IcebergType (pyiceberg.types.IcebergType)" href="#pyiceberg.types.IcebergType">IcebergType</a></code></p> |
| |
| |
| <p>A map type in Iceberg.</p> |
| |
| |
| <details class="example" open> |
| <summary>Example</summary> |
| <blockquote> |
| <blockquote> |
| <blockquote> |
| <p>MapType(key_id=1, key_type=StringType(), value_id=2, value_type=IntegerType(), value_required=True) |
| MapType(key_id=1, key_type=StringType(), value_id=2, value_type=IntegerType(), value_required=True)</p> |
| </blockquote> |
| </blockquote> |
| </blockquote> |
| </details> |
| |
| |
| |
| |
| |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-543">543</a></span> |
| <span class="normal"><a href="#__codelineno-0-544">544</a></span> |
| <span class="normal"><a href="#__codelineno-0-545">545</a></span> |
| <span class="normal"><a href="#__codelineno-0-546">546</a></span> |
| <span class="normal"><a href="#__codelineno-0-547">547</a></span> |
| <span class="normal"><a href="#__codelineno-0-548">548</a></span> |
| <span class="normal"><a href="#__codelineno-0-549">549</a></span> |
| <span class="normal"><a href="#__codelineno-0-550">550</a></span> |
| <span class="normal"><a href="#__codelineno-0-551">551</a></span> |
| <span class="normal"><a href="#__codelineno-0-552">552</a></span> |
| <span class="normal"><a href="#__codelineno-0-553">553</a></span> |
| <span class="normal"><a href="#__codelineno-0-554">554</a></span> |
| <span class="normal"><a href="#__codelineno-0-555">555</a></span> |
| <span class="normal"><a href="#__codelineno-0-556">556</a></span> |
| <span class="normal"><a href="#__codelineno-0-557">557</a></span> |
| <span class="normal"><a href="#__codelineno-0-558">558</a></span> |
| <span class="normal"><a href="#__codelineno-0-559">559</a></span> |
| <span class="normal"><a href="#__codelineno-0-560">560</a></span> |
| <span class="normal"><a href="#__codelineno-0-561">561</a></span> |
| <span class="normal"><a href="#__codelineno-0-562">562</a></span> |
| <span class="normal"><a href="#__codelineno-0-563">563</a></span> |
| <span class="normal"><a href="#__codelineno-0-564">564</a></span> |
| <span class="normal"><a href="#__codelineno-0-565">565</a></span> |
| <span class="normal"><a href="#__codelineno-0-566">566</a></span> |
| <span class="normal"><a href="#__codelineno-0-567">567</a></span> |
| <span class="normal"><a href="#__codelineno-0-568">568</a></span> |
| <span class="normal"><a href="#__codelineno-0-569">569</a></span> |
| <span class="normal"><a href="#__codelineno-0-570">570</a></span> |
| <span class="normal"><a href="#__codelineno-0-571">571</a></span> |
| <span class="normal"><a href="#__codelineno-0-572">572</a></span> |
| <span class="normal"><a href="#__codelineno-0-573">573</a></span> |
| <span class="normal"><a href="#__codelineno-0-574">574</a></span> |
| <span class="normal"><a href="#__codelineno-0-575">575</a></span> |
| <span class="normal"><a href="#__codelineno-0-576">576</a></span> |
| <span class="normal"><a href="#__codelineno-0-577">577</a></span> |
| <span class="normal"><a href="#__codelineno-0-578">578</a></span> |
| <span class="normal"><a href="#__codelineno-0-579">579</a></span> |
| <span class="normal"><a href="#__codelineno-0-580">580</a></span> |
| <span class="normal"><a href="#__codelineno-0-581">581</a></span> |
| <span class="normal"><a href="#__codelineno-0-582">582</a></span> |
| <span class="normal"><a href="#__codelineno-0-583">583</a></span> |
| <span class="normal"><a href="#__codelineno-0-584">584</a></span> |
| <span class="normal"><a href="#__codelineno-0-585">585</a></span> |
| <span class="normal"><a href="#__codelineno-0-586">586</a></span> |
| <span class="normal"><a href="#__codelineno-0-587">587</a></span> |
| <span class="normal"><a href="#__codelineno-0-588">588</a></span> |
| <span class="normal"><a href="#__codelineno-0-589">589</a></span> |
| <span class="normal"><a href="#__codelineno-0-590">590</a></span> |
| <span class="normal"><a href="#__codelineno-0-591">591</a></span> |
| <span class="normal"><a href="#__codelineno-0-592">592</a></span> |
| <span class="normal"><a href="#__codelineno-0-593">593</a></span> |
| <span class="normal"><a href="#__codelineno-0-594">594</a></span> |
| <span class="normal"><a href="#__codelineno-0-595">595</a></span> |
| <span class="normal"><a href="#__codelineno-0-596">596</a></span> |
| <span class="normal"><a href="#__codelineno-0-597">597</a></span> |
| <span class="normal"><a href="#__codelineno-0-598">598</a></span> |
| <span class="normal"><a href="#__codelineno-0-599">599</a></span> |
| <span class="normal"><a href="#__codelineno-0-600">600</a></span> |
| <span class="normal"><a href="#__codelineno-0-601">601</a></span> |
| <span class="normal"><a href="#__codelineno-0-602">602</a></span> |
| <span class="normal"><a href="#__codelineno-0-603">603</a></span> |
| <span class="normal"><a href="#__codelineno-0-604">604</a></span> |
| <span class="normal"><a href="#__codelineno-0-605">605</a></span> |
| <span class="normal"><a href="#__codelineno-0-606">606</a></span> |
| <span class="normal"><a href="#__codelineno-0-607">607</a></span> |
| <span class="normal"><a href="#__codelineno-0-608">608</a></span> |
| <span class="normal"><a href="#__codelineno-0-609">609</a></span> |
| <span class="normal"><a href="#__codelineno-0-610">610</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-543" name="__codelineno-0-543"></a><span class="k">class</span><span class="w"> </span><span class="nc">MapType</span><span class="p">(</span><span class="n">IcebergType</span><span class="p">):</span> |
| <a id="__codelineno-0-544" name="__codelineno-0-544"></a><span class="w"> </span><span class="sd">"""A map type in Iceberg.</span> |
| <a id="__codelineno-0-545" name="__codelineno-0-545"></a> |
| <a id="__codelineno-0-546" name="__codelineno-0-546"></a><span class="sd"> Example:</span> |
| <a id="__codelineno-0-547" name="__codelineno-0-547"></a><span class="sd"> >>> MapType(key_id=1, key_type=StringType(), value_id=2, value_type=IntegerType(), value_required=True)</span> |
| <a id="__codelineno-0-548" name="__codelineno-0-548"></a><span class="sd"> MapType(key_id=1, key_type=StringType(), value_id=2, value_type=IntegerType(), value_required=True)</span> |
| <a id="__codelineno-0-549" name="__codelineno-0-549"></a><span class="sd"> """</span> |
| <a id="__codelineno-0-550" name="__codelineno-0-550"></a> |
| <a id="__codelineno-0-551" name="__codelineno-0-551"></a> <span class="nb">type</span><span class="p">:</span> <span class="n">Literal</span><span class="p">[</span><span class="s2">"map"</span><span class="p">]</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"map"</span><span class="p">)</span> |
| <a id="__codelineno-0-552" name="__codelineno-0-552"></a> <span class="n">key_id</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">alias</span><span class="o">=</span><span class="s2">"key-id"</span><span class="p">)</span> |
| <a id="__codelineno-0-553" name="__codelineno-0-553"></a> <span class="n">key_type</span><span class="p">:</span> <span class="n">SerializeAsAny</span><span class="p">[</span><span class="n">IcebergType</span><span class="p">]</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">alias</span><span class="o">=</span><span class="s2">"key"</span><span class="p">)</span> |
| <a id="__codelineno-0-554" name="__codelineno-0-554"></a> <span class="n">value_id</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">alias</span><span class="o">=</span><span class="s2">"value-id"</span><span class="p">)</span> |
| <a id="__codelineno-0-555" name="__codelineno-0-555"></a> <span class="n">value_type</span><span class="p">:</span> <span class="n">SerializeAsAny</span><span class="p">[</span><span class="n">IcebergType</span><span class="p">]</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">alias</span><span class="o">=</span><span class="s2">"value"</span><span class="p">)</span> |
| <a id="__codelineno-0-556" name="__codelineno-0-556"></a> <span class="n">value_required</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">alias</span><span class="o">=</span><span class="s2">"value-required"</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> |
| <a id="__codelineno-0-557" name="__codelineno-0-557"></a> <span class="n">_hash</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="n">PrivateAttr</span><span class="p">()</span> |
| <a id="__codelineno-0-558" name="__codelineno-0-558"></a> |
| <a id="__codelineno-0-559" name="__codelineno-0-559"></a> <span class="k">def</span><span class="w"> </span><span class="fm">__init__</span><span class="p">(</span> |
| <a id="__codelineno-0-560" name="__codelineno-0-560"></a> <span class="bp">self</span><span class="p">,</span> |
| <a id="__codelineno-0-561" name="__codelineno-0-561"></a> <span class="n">key_id</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="o">=</span> <span class="kc">None</span><span class="p">,</span> |
| <a id="__codelineno-0-562" name="__codelineno-0-562"></a> <span class="n">key_type</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">IcebergType</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> |
| <a id="__codelineno-0-563" name="__codelineno-0-563"></a> <span class="n">value_id</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="o">=</span> <span class="kc">None</span><span class="p">,</span> |
| <a id="__codelineno-0-564" name="__codelineno-0-564"></a> <span class="n">value_type</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">IcebergType</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> |
| <a id="__codelineno-0-565" name="__codelineno-0-565"></a> <span class="n">value_required</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">,</span> |
| <a id="__codelineno-0-566" name="__codelineno-0-566"></a> <span class="o">**</span><span class="n">data</span><span class="p">:</span> <span class="n">Any</span><span class="p">,</span> |
| <a id="__codelineno-0-567" name="__codelineno-0-567"></a> <span class="p">):</span> |
| <a id="__codelineno-0-568" name="__codelineno-0-568"></a> <span class="n">data</span><span class="p">[</span><span class="s2">"key-id"</span><span class="p">]</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="s2">"key-id"</span><span class="p">]</span> <span class="k">if</span> <span class="s2">"key-id"</span> <span class="ow">in</span> <span class="n">data</span> <span class="k">else</span> <span class="n">key_id</span> |
| <a id="__codelineno-0-569" name="__codelineno-0-569"></a> <span class="n">data</span><span class="p">[</span><span class="s2">"key"</span><span class="p">]</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="s2">"key"</span><span class="p">]</span> <span class="k">if</span> <span class="s2">"key"</span> <span class="ow">in</span> <span class="n">data</span> <span class="k">else</span> <span class="n">key_type</span> |
| <a id="__codelineno-0-570" name="__codelineno-0-570"></a> <span class="n">data</span><span class="p">[</span><span class="s2">"value-id"</span><span class="p">]</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="s2">"value-id"</span><span class="p">]</span> <span class="k">if</span> <span class="s2">"value-id"</span> <span class="ow">in</span> <span class="n">data</span> <span class="k">else</span> <span class="n">value_id</span> |
| <a id="__codelineno-0-571" name="__codelineno-0-571"></a> <span class="n">data</span><span class="p">[</span><span class="s2">"value"</span><span class="p">]</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="s2">"value"</span><span class="p">]</span> <span class="k">if</span> <span class="s2">"value"</span> <span class="ow">in</span> <span class="n">data</span> <span class="k">else</span> <span class="n">value_type</span> |
| <a id="__codelineno-0-572" name="__codelineno-0-572"></a> <span class="n">data</span><span class="p">[</span><span class="s2">"value-required"</span><span class="p">]</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="s2">"value-required"</span><span class="p">]</span> <span class="k">if</span> <span class="s2">"value-required"</span> <span class="ow">in</span> <span class="n">data</span> <span class="k">else</span> <span class="n">value_required</span> |
| <a id="__codelineno-0-573" name="__codelineno-0-573"></a> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="o">**</span><span class="n">data</span><span class="p">)</span> |
| <a id="__codelineno-0-574" name="__codelineno-0-574"></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">__getnewargs__</span><span class="p">())</span> |
| <a id="__codelineno-0-575" name="__codelineno-0-575"></a> |
| <a id="__codelineno-0-576" name="__codelineno-0-576"></a> <span class="nd">@cached_property</span> |
| <a id="__codelineno-0-577" name="__codelineno-0-577"></a> <span class="k">def</span><span class="w"> </span><span class="nf">key_field</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">NestedField</span><span class="p">:</span> |
| <a id="__codelineno-0-578" name="__codelineno-0-578"></a> <span class="k">return</span> <span class="n">NestedField</span><span class="p">(</span> |
| <a id="__codelineno-0-579" name="__codelineno-0-579"></a> <span class="n">name</span><span class="o">=</span><span class="s2">"key"</span><span class="p">,</span> |
| <a id="__codelineno-0-580" name="__codelineno-0-580"></a> <span class="n">field_id</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">key_id</span><span class="p">,</span> |
| <a id="__codelineno-0-581" name="__codelineno-0-581"></a> <span class="n">field_type</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">key_type</span><span class="p">,</span> |
| <a id="__codelineno-0-582" name="__codelineno-0-582"></a> <span class="n">required</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> |
| <a id="__codelineno-0-583" name="__codelineno-0-583"></a> <span class="p">)</span> |
| <a id="__codelineno-0-584" name="__codelineno-0-584"></a> |
| <a id="__codelineno-0-585" name="__codelineno-0-585"></a> <span class="nd">@cached_property</span> |
| <a id="__codelineno-0-586" name="__codelineno-0-586"></a> <span class="k">def</span><span class="w"> </span><span class="nf">value_field</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">NestedField</span><span class="p">:</span> |
| <a id="__codelineno-0-587" name="__codelineno-0-587"></a> <span class="k">return</span> <span class="n">NestedField</span><span class="p">(</span> |
| <a id="__codelineno-0-588" name="__codelineno-0-588"></a> <span class="n">name</span><span class="o">=</span><span class="s2">"value"</span><span class="p">,</span> |
| <a id="__codelineno-0-589" name="__codelineno-0-589"></a> <span class="n">field_id</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">value_id</span><span class="p">,</span> |
| <a id="__codelineno-0-590" name="__codelineno-0-590"></a> <span class="n">field_type</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">value_type</span><span class="p">,</span> |
| <a id="__codelineno-0-591" name="__codelineno-0-591"></a> <span class="n">required</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">value_required</span><span class="p">,</span> |
| <a id="__codelineno-0-592" name="__codelineno-0-592"></a> <span class="p">)</span> |
| <a id="__codelineno-0-593" name="__codelineno-0-593"></a> |
| <a id="__codelineno-0-594" name="__codelineno-0-594"></a> <span class="k">def</span><span class="w"> </span><span class="fm">__str__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> |
| <a id="__codelineno-0-595" name="__codelineno-0-595"></a><span class="w"> </span><span class="sd">"""Return the string representation of the MapType class."""</span> |
| <a id="__codelineno-0-596" name="__codelineno-0-596"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"map<</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">key_type</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">value_type</span><span class="si">}</span><span class="s2">>"</span> |
| <a id="__codelineno-0-597" name="__codelineno-0-597"></a> |
| <a id="__codelineno-0-598" name="__codelineno-0-598"></a> <span class="k">def</span><span class="w"> </span><span class="nf">__getnewargs__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">Tuple</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="n">IcebergType</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="n">IcebergType</span><span class="p">,</span> <span class="nb">bool</span><span class="p">]:</span> |
| <a id="__codelineno-0-599" name="__codelineno-0-599"></a><span class="w"> </span><span class="sd">"""Pickle the MapType class."""</span> |
| <a id="__codelineno-0-600" name="__codelineno-0-600"></a> <span class="k">return</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">key_id</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">key_type</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">value_id</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">value_type</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">value_required</span><span class="p">)</span> |
| <a id="__codelineno-0-601" name="__codelineno-0-601"></a> |
| <a id="__codelineno-0-602" name="__codelineno-0-602"></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">-></span> <span class="nb">int</span><span class="p">:</span> |
| <a id="__codelineno-0-603" name="__codelineno-0-603"></a><span class="w"> </span><span class="sd">"""Return the hash of the MapType."""</span> |
| <a id="__codelineno-0-604" name="__codelineno-0-604"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_hash</span> |
| <a id="__codelineno-0-605" name="__codelineno-0-605"></a> |
| <a id="__codelineno-0-606" name="__codelineno-0-606"></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">-></span> <span class="nb">bool</span><span class="p">:</span> |
| <a id="__codelineno-0-607" name="__codelineno-0-607"></a><span class="w"> </span><span class="sd">"""Compare the MapType to another object."""</span> |
| <a id="__codelineno-0-608" name="__codelineno-0-608"></a> <span class="k">return</span> <span class="p">(</span> |
| <a id="__codelineno-0-609" name="__codelineno-0-609"></a> <span class="bp">self</span><span class="o">.</span><span class="n">key_field</span> <span class="o">==</span> <span class="n">other</span><span class="o">.</span><span class="n">key_field</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">value_field</span> <span class="o">==</span> <span class="n">other</span><span class="o">.</span><span class="n">value_field</span> <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">MapType</span><span class="p">)</span> <span class="k">else</span> <span class="kc">False</span> |
| <a id="__codelineno-0-610" name="__codelineno-0-610"></a> <span class="p">)</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| |
| |
| |
| <div class="doc doc-children"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h3 id="pyiceberg.types.MapType.__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.types.MapType.__eq__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Compare the MapType to another object.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-606">606</a></span> |
| <span class="normal"><a href="#__codelineno-0-607">607</a></span> |
| <span class="normal"><a href="#__codelineno-0-608">608</a></span> |
| <span class="normal"><a href="#__codelineno-0-609">609</a></span> |
| <span class="normal"><a href="#__codelineno-0-610">610</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-606" name="__codelineno-0-606"></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">-></span> <span class="nb">bool</span><span class="p">:</span> |
| <a id="__codelineno-0-607" name="__codelineno-0-607"></a><span class="w"> </span><span class="sd">"""Compare the MapType to another object."""</span> |
| <a id="__codelineno-0-608" name="__codelineno-0-608"></a> <span class="k">return</span> <span class="p">(</span> |
| <a id="__codelineno-0-609" name="__codelineno-0-609"></a> <span class="bp">self</span><span class="o">.</span><span class="n">key_field</span> <span class="o">==</span> <span class="n">other</span><span class="o">.</span><span class="n">key_field</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">value_field</span> <span class="o">==</span> <span class="n">other</span><span class="o">.</span><span class="n">value_field</span> <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">MapType</span><span class="p">)</span> <span class="k">else</span> <span class="kc">False</span> |
| <a id="__codelineno-0-610" name="__codelineno-0-610"></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.types.MapType.__getnewargs__" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="n">__getnewargs__</span><span class="p">()</span></code> |
| |
| <a href="#pyiceberg.types.MapType.__getnewargs__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Pickle the MapType class.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-598">598</a></span> |
| <span class="normal"><a href="#__codelineno-0-599">599</a></span> |
| <span class="normal"><a href="#__codelineno-0-600">600</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-598" name="__codelineno-0-598"></a><span class="k">def</span><span class="w"> </span><span class="nf">__getnewargs__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">Tuple</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="n">IcebergType</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="n">IcebergType</span><span class="p">,</span> <span class="nb">bool</span><span class="p">]:</span> |
| <a id="__codelineno-0-599" name="__codelineno-0-599"></a><span class="w"> </span><span class="sd">"""Pickle the MapType class."""</span> |
| <a id="__codelineno-0-600" name="__codelineno-0-600"></a> <span class="k">return</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">key_id</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">key_type</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">value_id</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">value_type</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">value_required</span><span class="p">)</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h3 id="pyiceberg.types.MapType.__hash__" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="fm">__hash__</span><span class="p">()</span></code> |
| |
| <a href="#pyiceberg.types.MapType.__hash__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Return the hash of the MapType.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-602">602</a></span> |
| <span class="normal"><a href="#__codelineno-0-603">603</a></span> |
| <span class="normal"><a href="#__codelineno-0-604">604</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-602" name="__codelineno-0-602"></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">-></span> <span class="nb">int</span><span class="p">:</span> |
| <a id="__codelineno-0-603" name="__codelineno-0-603"></a><span class="w"> </span><span class="sd">"""Return the hash of the MapType."""</span> |
| <a id="__codelineno-0-604" name="__codelineno-0-604"></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.types.MapType.__str__" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="fm">__str__</span><span class="p">()</span></code> |
| |
| <a href="#pyiceberg.types.MapType.__str__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Return the string representation of the MapType class.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-594">594</a></span> |
| <span class="normal"><a href="#__codelineno-0-595">595</a></span> |
| <span class="normal"><a href="#__codelineno-0-596">596</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-594" name="__codelineno-0-594"></a><span class="k">def</span><span class="w"> </span><span class="fm">__str__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> |
| <a id="__codelineno-0-595" name="__codelineno-0-595"></a><span class="w"> </span><span class="sd">"""Return the string representation of the MapType class."""</span> |
| <a id="__codelineno-0-596" name="__codelineno-0-596"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"map<</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">key_type</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">value_type</span><span class="si">}</span><span class="s2">>"</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| |
| |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-class"> |
| |
| |
| |
| <h2 id="pyiceberg.types.NestedField" class="doc doc-heading"> |
| <code>NestedField</code> |
| |
| |
| <a href="#pyiceberg.types.NestedField" class="headerlink" title="Permanent link">¶</a></h2> |
| |
| |
| <div class="doc doc-contents "> |
| <p class="doc doc-class-bases"> |
| Bases: <code><a class="autorefs autorefs-internal" title="IcebergType (pyiceberg.types.IcebergType)" href="#pyiceberg.types.IcebergType">IcebergType</a></code></p> |
| |
| |
| <p>Represents a field of a struct, a map key, a map value, or a list element.</p> |
| <p>This is where field IDs, names, docs, and nullability are tracked.</p> |
| |
| |
| <details class="example" open> |
| <summary>Example</summary> |
| <blockquote> |
| <blockquote> |
| <blockquote> |
| <p>str(NestedField( |
| ... field_id=1, |
| ... name='foo', |
| ... field_type=FixedType(22), |
| ... required=False, |
| ... )) |
| '1: foo: optional fixed[22]' |
| str(NestedField( |
| ... field_id=2, |
| ... name='bar', |
| ... field_type=LongType(), |
| ... is_optional=False, |
| ... doc="Just a long" |
| ... )) |
| '2: bar: required long (Just a long)' |
| str(NestedField( |
| ... field_id=3, |
| ... name='baz', |
| ... field_type="string", |
| ... required=True, |
| ... doc="A string field" |
| ... )) |
| '3: baz: required string (A string field)'</p> |
| </blockquote> |
| </blockquote> |
| </blockquote> |
| </details> |
| |
| |
| |
| |
| |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-307">307</a></span> |
| <span class="normal"><a href="#__codelineno-0-308">308</a></span> |
| <span class="normal"><a href="#__codelineno-0-309">309</a></span> |
| <span class="normal"><a href="#__codelineno-0-310">310</a></span> |
| <span class="normal"><a href="#__codelineno-0-311">311</a></span> |
| <span class="normal"><a href="#__codelineno-0-312">312</a></span> |
| <span class="normal"><a href="#__codelineno-0-313">313</a></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> |
| <span class="normal"><a href="#__codelineno-0-385">385</a></span> |
| <span class="normal"><a href="#__codelineno-0-386">386</a></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> |
| <span class="normal"><a href="#__codelineno-0-419">419</a></span> |
| <span class="normal"><a href="#__codelineno-0-420">420</a></span> |
| <span class="normal"><a href="#__codelineno-0-421">421</a></span> |
| <span class="normal"><a href="#__codelineno-0-422">422</a></span> |
| <span class="normal"><a href="#__codelineno-0-423">423</a></span> |
| <span class="normal"><a href="#__codelineno-0-424">424</a></span> |
| <span class="normal"><a href="#__codelineno-0-425">425</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-307" name="__codelineno-0-307"></a><span class="k">class</span><span class="w"> </span><span class="nc">NestedField</span><span class="p">(</span><span class="n">IcebergType</span><span class="p">):</span> |
| <a id="__codelineno-0-308" name="__codelineno-0-308"></a><span class="w"> </span><span class="sd">"""Represents a field of a struct, a map key, a map value, or a list element.</span> |
| <a id="__codelineno-0-309" name="__codelineno-0-309"></a> |
| <a id="__codelineno-0-310" name="__codelineno-0-310"></a><span class="sd"> This is where field IDs, names, docs, and nullability are tracked.</span> |
| <a id="__codelineno-0-311" name="__codelineno-0-311"></a> |
| <a id="__codelineno-0-312" name="__codelineno-0-312"></a><span class="sd"> Example:</span> |
| <a id="__codelineno-0-313" name="__codelineno-0-313"></a><span class="sd"> >>> str(NestedField(</span> |
| <a id="__codelineno-0-314" name="__codelineno-0-314"></a><span class="sd"> ... field_id=1,</span> |
| <a id="__codelineno-0-315" name="__codelineno-0-315"></a><span class="sd"> ... name='foo',</span> |
| <a id="__codelineno-0-316" name="__codelineno-0-316"></a><span class="sd"> ... field_type=FixedType(22),</span> |
| <a id="__codelineno-0-317" name="__codelineno-0-317"></a><span class="sd"> ... required=False,</span> |
| <a id="__codelineno-0-318" name="__codelineno-0-318"></a><span class="sd"> ... ))</span> |
| <a id="__codelineno-0-319" name="__codelineno-0-319"></a><span class="sd"> '1: foo: optional fixed[22]'</span> |
| <a id="__codelineno-0-320" name="__codelineno-0-320"></a><span class="sd"> >>> str(NestedField(</span> |
| <a id="__codelineno-0-321" name="__codelineno-0-321"></a><span class="sd"> ... field_id=2,</span> |
| <a id="__codelineno-0-322" name="__codelineno-0-322"></a><span class="sd"> ... name='bar',</span> |
| <a id="__codelineno-0-323" name="__codelineno-0-323"></a><span class="sd"> ... field_type=LongType(),</span> |
| <a id="__codelineno-0-324" name="__codelineno-0-324"></a><span class="sd"> ... is_optional=False,</span> |
| <a id="__codelineno-0-325" name="__codelineno-0-325"></a><span class="sd"> ... doc="Just a long"</span> |
| <a id="__codelineno-0-326" name="__codelineno-0-326"></a><span class="sd"> ... ))</span> |
| <a id="__codelineno-0-327" name="__codelineno-0-327"></a><span class="sd"> '2: bar: required long (Just a long)'</span> |
| <a id="__codelineno-0-328" name="__codelineno-0-328"></a><span class="sd"> >>> str(NestedField(</span> |
| <a id="__codelineno-0-329" name="__codelineno-0-329"></a><span class="sd"> ... field_id=3,</span> |
| <a id="__codelineno-0-330" name="__codelineno-0-330"></a><span class="sd"> ... name='baz',</span> |
| <a id="__codelineno-0-331" name="__codelineno-0-331"></a><span class="sd"> ... field_type="string",</span> |
| <a id="__codelineno-0-332" name="__codelineno-0-332"></a><span class="sd"> ... required=True,</span> |
| <a id="__codelineno-0-333" name="__codelineno-0-333"></a><span class="sd"> ... doc="A string field"</span> |
| <a id="__codelineno-0-334" name="__codelineno-0-334"></a><span class="sd"> ... ))</span> |
| <a id="__codelineno-0-335" name="__codelineno-0-335"></a><span class="sd"> '3: baz: required string (A string field)'</span> |
| <a id="__codelineno-0-336" name="__codelineno-0-336"></a><span class="sd"> """</span> |
| <a id="__codelineno-0-337" name="__codelineno-0-337"></a> |
| <a id="__codelineno-0-338" name="__codelineno-0-338"></a> <span class="n">field_id</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">alias</span><span class="o">=</span><span class="s2">"id"</span><span class="p">)</span> |
| <a id="__codelineno-0-339" name="__codelineno-0-339"></a> <span class="n">name</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="n">Field</span><span class="p">()</span> |
| <a id="__codelineno-0-340" name="__codelineno-0-340"></a> <span class="n">field_type</span><span class="p">:</span> <span class="n">SerializeAsAny</span><span class="p">[</span><span class="n">IcebergType</span><span class="p">]</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">alias</span><span class="o">=</span><span class="s2">"type"</span><span class="p">)</span> |
| <a id="__codelineno-0-341" name="__codelineno-0-341"></a> <span class="n">required</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span> |
| <a id="__codelineno-0-342" name="__codelineno-0-342"></a> <span class="n">doc</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="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="nb">repr</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span> |
| <a id="__codelineno-0-343" name="__codelineno-0-343"></a> <span class="n">initial_default</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">DefaultValue</span><span class="p">]</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">alias</span><span class="o">=</span><span class="s2">"initial-default"</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="nb">repr</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> <span class="c1"># type: ignore</span> |
| <a id="__codelineno-0-344" name="__codelineno-0-344"></a> <span class="n">write_default</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">DefaultValue</span><span class="p">]</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">alias</span><span class="o">=</span><span class="s2">"write-default"</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="nb">repr</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> <span class="c1"># type: ignore</span> |
| <a id="__codelineno-0-345" name="__codelineno-0-345"></a> |
| <a id="__codelineno-0-346" name="__codelineno-0-346"></a> <span class="nd">@field_validator</span><span class="p">(</span><span class="s2">"field_type"</span><span class="p">,</span> <span class="n">mode</span><span class="o">=</span><span class="s2">"before"</span><span class="p">)</span> |
| <a id="__codelineno-0-347" name="__codelineno-0-347"></a> <span class="k">def</span><span class="w"> </span><span class="nf">convert_field_type</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">v</span><span class="p">:</span> <span class="n">Any</span><span class="p">)</span> <span class="o">-></span> <span class="n">IcebergType</span><span class="p">:</span> |
| <a id="__codelineno-0-348" name="__codelineno-0-348"></a><span class="w"> </span><span class="sd">"""Convert string values into IcebergType instances."""</span> |
| <a id="__codelineno-0-349" name="__codelineno-0-349"></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="nb">str</span><span class="p">):</span> |
| <a id="__codelineno-0-350" name="__codelineno-0-350"></a> <span class="k">try</span><span class="p">:</span> |
| <a id="__codelineno-0-351" name="__codelineno-0-351"></a> <span class="k">return</span> <span class="n">IcebergType</span><span class="o">.</span><span class="n">handle_primitive_type</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> |
| <a id="__codelineno-0-352" name="__codelineno-0-352"></a> <span class="k">except</span> <span class="ne">ValueError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span> |
| <a id="__codelineno-0-353" name="__codelineno-0-353"></a> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Unsupported field type: '</span><span class="si">{</span><span class="n">v</span><span class="si">}</span><span class="s2">'"</span><span class="p">)</span> <span class="kn">from</span><span class="w"> </span><span class="nn">e</span> |
| <a id="__codelineno-0-354" name="__codelineno-0-354"></a> <span class="k">return</span> <span class="n">v</span> |
| <a id="__codelineno-0-355" name="__codelineno-0-355"></a> |
| <a id="__codelineno-0-356" name="__codelineno-0-356"></a> <span class="k">def</span><span class="w"> </span><span class="fm">__init__</span><span class="p">(</span> |
| <a id="__codelineno-0-357" name="__codelineno-0-357"></a> <span class="bp">self</span><span class="p">,</span> |
| <a id="__codelineno-0-358" name="__codelineno-0-358"></a> <span class="n">field_id</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="o">=</span> <span class="kc">None</span><span class="p">,</span> |
| <a id="__codelineno-0-359" name="__codelineno-0-359"></a> <span class="n">name</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="o">=</span> <span class="kc">None</span><span class="p">,</span> |
| <a id="__codelineno-0-360" name="__codelineno-0-360"></a> <span class="n">field_type</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">IcebergType</span> <span class="o">|</span> <span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> |
| <a id="__codelineno-0-361" name="__codelineno-0-361"></a> <span class="n">required</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">,</span> |
| <a id="__codelineno-0-362" name="__codelineno-0-362"></a> <span class="n">doc</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="o">=</span> <span class="kc">None</span><span class="p">,</span> |
| <a id="__codelineno-0-363" name="__codelineno-0-363"></a> <span class="n">initial_default</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">Any</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> |
| <a id="__codelineno-0-364" name="__codelineno-0-364"></a> <span class="n">write_default</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">L</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> |
| <a id="__codelineno-0-365" name="__codelineno-0-365"></a> <span class="o">**</span><span class="n">data</span><span class="p">:</span> <span class="n">Any</span><span class="p">,</span> |
| <a id="__codelineno-0-366" name="__codelineno-0-366"></a> <span class="p">):</span> |
| <a id="__codelineno-0-367" name="__codelineno-0-367"></a> <span class="c1"># We need an init when we want to use positional arguments, but</span> |
| <a id="__codelineno-0-368" name="__codelineno-0-368"></a> <span class="c1"># need also to support the aliases.</span> |
| <a id="__codelineno-0-369" name="__codelineno-0-369"></a> <span class="n">data</span><span class="p">[</span><span class="s2">"id"</span><span class="p">]</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="s2">"id"</span><span class="p">]</span> <span class="k">if</span> <span class="s2">"id"</span> <span class="ow">in</span> <span class="n">data</span> <span class="k">else</span> <span class="n">field_id</span> |
| <a id="__codelineno-0-370" name="__codelineno-0-370"></a> <span class="n">data</span><span class="p">[</span><span class="s2">"name"</span><span class="p">]</span> <span class="o">=</span> <span class="n">name</span> |
| <a id="__codelineno-0-371" name="__codelineno-0-371"></a> <span class="n">data</span><span class="p">[</span><span class="s2">"type"</span><span class="p">]</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="s2">"type"</span><span class="p">]</span> <span class="k">if</span> <span class="s2">"type"</span> <span class="ow">in</span> <span class="n">data</span> <span class="k">else</span> <span class="n">field_type</span> |
| <a id="__codelineno-0-372" name="__codelineno-0-372"></a> <span class="n">data</span><span class="p">[</span><span class="s2">"required"</span><span class="p">]</span> <span class="o">=</span> <span class="n">required</span> |
| <a id="__codelineno-0-373" name="__codelineno-0-373"></a> <span class="n">data</span><span class="p">[</span><span class="s2">"doc"</span><span class="p">]</span> <span class="o">=</span> <span class="n">doc</span> |
| <a id="__codelineno-0-374" name="__codelineno-0-374"></a> <span class="n">data</span><span class="p">[</span><span class="s2">"initial-default"</span><span class="p">]</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="s2">"initial-default"</span><span class="p">]</span> <span class="k">if</span> <span class="s2">"initial-default"</span> <span class="ow">in</span> <span class="n">data</span> <span class="k">else</span> <span class="n">initial_default</span> |
| <a id="__codelineno-0-375" name="__codelineno-0-375"></a> <span class="n">data</span><span class="p">[</span><span class="s2">"write-default"</span><span class="p">]</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="s2">"write-default"</span><span class="p">]</span> <span class="k">if</span> <span class="s2">"write-default"</span> <span class="ow">in</span> <span class="n">data</span> <span class="k">else</span> <span class="n">write_default</span> |
| <a id="__codelineno-0-376" name="__codelineno-0-376"></a> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="o">**</span><span class="n">data</span><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="nd">@model_serializer</span><span class="p">()</span> |
| <a id="__codelineno-0-379" name="__codelineno-0-379"></a> <span class="k">def</span><span class="w"> </span><span class="nf">serialize_model</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">]:</span> |
| <a id="__codelineno-0-380" name="__codelineno-0-380"></a> <span class="kn">from</span><span class="w"> </span><span class="nn">pyiceberg.conversions</span><span class="w"> </span><span class="kn">import</span> <span class="n">to_json</span> |
| <a id="__codelineno-0-381" name="__codelineno-0-381"></a> |
| <a id="__codelineno-0-382" name="__codelineno-0-382"></a> <span class="n">fields</span> <span class="o">=</span> <span class="p">{</span> |
| <a id="__codelineno-0-383" name="__codelineno-0-383"></a> <span class="s2">"id"</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">field_id</span><span class="p">,</span> |
| <a id="__codelineno-0-384" name="__codelineno-0-384"></a> <span class="s2">"name"</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> |
| <a id="__codelineno-0-385" name="__codelineno-0-385"></a> <span class="s2">"type"</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">field_type</span><span class="p">,</span> |
| <a id="__codelineno-0-386" name="__codelineno-0-386"></a> <span class="s2">"required"</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">required</span><span class="p">,</span> |
| <a id="__codelineno-0-387" name="__codelineno-0-387"></a> <span class="p">}</span> |
| <a id="__codelineno-0-388" name="__codelineno-0-388"></a> |
| <a id="__codelineno-0-389" name="__codelineno-0-389"></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">doc</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> |
| <a id="__codelineno-0-390" name="__codelineno-0-390"></a> <span class="n">fields</span><span class="p">[</span><span class="s2">"doc"</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">doc</span> |
| <a id="__codelineno-0-391" name="__codelineno-0-391"></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">initial_default</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> |
| <a id="__codelineno-0-392" name="__codelineno-0-392"></a> <span class="n">fields</span><span class="p">[</span><span class="s2">"initial-default"</span><span class="p">]</span> <span class="o">=</span> <span class="n">to_json</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">field_type</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">initial_default</span><span class="p">)</span> |
| <a id="__codelineno-0-393" name="__codelineno-0-393"></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">write_default</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> |
| <a id="__codelineno-0-394" name="__codelineno-0-394"></a> <span class="n">fields</span><span class="p">[</span><span class="s2">"write-default"</span><span class="p">]</span> <span class="o">=</span> <span class="n">to_json</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">field_type</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">write_default</span><span class="p">)</span> |
| <a id="__codelineno-0-395" name="__codelineno-0-395"></a> |
| <a id="__codelineno-0-396" name="__codelineno-0-396"></a> <span class="k">return</span> <span class="n">fields</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="fm">__str__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> |
| <a id="__codelineno-0-399" name="__codelineno-0-399"></a><span class="w"> </span><span class="sd">"""Return the string representation of the NestedField class."""</span> |
| <a id="__codelineno-0-400" name="__codelineno-0-400"></a> <span class="n">doc</span> <span class="o">=</span> <span class="s2">""</span> <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">doc</span> <span class="k">else</span> <span class="sa">f</span><span class="s2">" (</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">doc</span><span class="si">}</span><span class="s2">)"</span> |
| <a id="__codelineno-0-401" name="__codelineno-0-401"></a> <span class="n">req</span> <span class="o">=</span> <span class="s2">"required"</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">required</span> <span class="k">else</span> <span class="s2">"optional"</span> |
| <a id="__codelineno-0-402" name="__codelineno-0-402"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">field_id</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">name</span><span class="si">}</span><span class="s2">: </span><span class="si">{</span><span class="n">req</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">field_type</span><span class="si">}{</span><span class="n">doc</span><span class="si">}</span><span class="s2">"</span> |
| <a id="__codelineno-0-403" name="__codelineno-0-403"></a> |
| <a id="__codelineno-0-404" name="__codelineno-0-404"></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">-></span> <span class="nb">str</span><span class="p">:</span> |
| <a id="__codelineno-0-405" name="__codelineno-0-405"></a><span class="w"> </span><span class="sd">"""Return the string representation of the NestedField class."""</span> |
| <a id="__codelineno-0-406" name="__codelineno-0-406"></a> <span class="n">parts</span> <span class="o">=</span> <span class="p">[</span> |
| <a id="__codelineno-0-407" name="__codelineno-0-407"></a> <span class="sa">f</span><span class="s2">"field_id=</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">field_id</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span> |
| <a id="__codelineno-0-408" name="__codelineno-0-408"></a> <span class="sa">f</span><span class="s2">"name=</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">name</span><span class="si">!r}</span><span class="s2">"</span><span class="p">,</span> |
| <a id="__codelineno-0-409" name="__codelineno-0-409"></a> <span class="sa">f</span><span class="s2">"field_type=</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">field_type</span><span class="si">!r}</span><span class="s2">"</span><span class="p">,</span> |
| <a id="__codelineno-0-410" name="__codelineno-0-410"></a> <span class="sa">f</span><span class="s2">"required=</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">required</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span> |
| <a id="__codelineno-0-411" name="__codelineno-0-411"></a> <span class="p">]</span> |
| <a id="__codelineno-0-412" name="__codelineno-0-412"></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">initial_default</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> |
| <a id="__codelineno-0-413" name="__codelineno-0-413"></a> <span class="n">parts</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="sa">f</span><span class="s2">"initial_default=</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">initial_default</span><span class="si">!r}</span><span class="s2">"</span><span class="p">)</span> |
| <a id="__codelineno-0-414" name="__codelineno-0-414"></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">write_default</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> |
| <a id="__codelineno-0-415" name="__codelineno-0-415"></a> <span class="n">parts</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="sa">f</span><span class="s2">"write_default=</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">write_default</span><span class="si">!r}</span><span class="s2">"</span><span class="p">)</span> |
| <a id="__codelineno-0-416" name="__codelineno-0-416"></a> |
| <a id="__codelineno-0-417" name="__codelineno-0-417"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"NestedField(</span><span class="si">{</span><span class="s1">', '</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">parts</span><span class="p">)</span><span class="si">}</span><span class="s2">)"</span> |
| <a id="__codelineno-0-418" name="__codelineno-0-418"></a> |
| <a id="__codelineno-0-419" name="__codelineno-0-419"></a> <span class="k">def</span><span class="w"> </span><span class="nf">__getnewargs__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">Tuple</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">str</span><span class="p">,</span> <span class="n">IcebergType</span><span class="p">,</span> <span class="nb">bool</span><span class="p">,</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]]:</span> |
| <a id="__codelineno-0-420" name="__codelineno-0-420"></a><span class="w"> </span><span class="sd">"""Pickle the NestedField class."""</span> |
| <a id="__codelineno-0-421" name="__codelineno-0-421"></a> <span class="k">return</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">field_id</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">field_type</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">required</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">doc</span><span class="p">)</span> |
| <a id="__codelineno-0-422" name="__codelineno-0-422"></a> |
| <a id="__codelineno-0-423" name="__codelineno-0-423"></a> <span class="nd">@property</span> |
| <a id="__codelineno-0-424" name="__codelineno-0-424"></a> <span class="k">def</span><span class="w"> </span><span class="nf">optional</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">bool</span><span class="p">:</span> |
| <a id="__codelineno-0-425" name="__codelineno-0-425"></a> <span class="k">return</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">required</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| |
| |
| |
| <div class="doc doc-children"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h3 id="pyiceberg.types.NestedField.__getnewargs__" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="n">__getnewargs__</span><span class="p">()</span></code> |
| |
| <a href="#pyiceberg.types.NestedField.__getnewargs__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Pickle the NestedField class.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-419">419</a></span> |
| <span class="normal"><a href="#__codelineno-0-420">420</a></span> |
| <span class="normal"><a href="#__codelineno-0-421">421</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-419" name="__codelineno-0-419"></a><span class="k">def</span><span class="w"> </span><span class="nf">__getnewargs__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">Tuple</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">str</span><span class="p">,</span> <span class="n">IcebergType</span><span class="p">,</span> <span class="nb">bool</span><span class="p">,</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]]:</span> |
| <a id="__codelineno-0-420" name="__codelineno-0-420"></a><span class="w"> </span><span class="sd">"""Pickle the NestedField class."""</span> |
| <a id="__codelineno-0-421" name="__codelineno-0-421"></a> <span class="k">return</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">field_id</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">field_type</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">required</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">doc</span><span class="p">)</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h3 id="pyiceberg.types.NestedField.__repr__" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="fm">__repr__</span><span class="p">()</span></code> |
| |
| <a href="#pyiceberg.types.NestedField.__repr__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Return the string representation of the NestedField class.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-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></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-404" name="__codelineno-0-404"></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">-></span> <span class="nb">str</span><span class="p">:</span> |
| <a id="__codelineno-0-405" name="__codelineno-0-405"></a><span class="w"> </span><span class="sd">"""Return the string representation of the NestedField class."""</span> |
| <a id="__codelineno-0-406" name="__codelineno-0-406"></a> <span class="n">parts</span> <span class="o">=</span> <span class="p">[</span> |
| <a id="__codelineno-0-407" name="__codelineno-0-407"></a> <span class="sa">f</span><span class="s2">"field_id=</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">field_id</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span> |
| <a id="__codelineno-0-408" name="__codelineno-0-408"></a> <span class="sa">f</span><span class="s2">"name=</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">name</span><span class="si">!r}</span><span class="s2">"</span><span class="p">,</span> |
| <a id="__codelineno-0-409" name="__codelineno-0-409"></a> <span class="sa">f</span><span class="s2">"field_type=</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">field_type</span><span class="si">!r}</span><span class="s2">"</span><span class="p">,</span> |
| <a id="__codelineno-0-410" name="__codelineno-0-410"></a> <span class="sa">f</span><span class="s2">"required=</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">required</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span> |
| <a id="__codelineno-0-411" name="__codelineno-0-411"></a> <span class="p">]</span> |
| <a id="__codelineno-0-412" name="__codelineno-0-412"></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">initial_default</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> |
| <a id="__codelineno-0-413" name="__codelineno-0-413"></a> <span class="n">parts</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="sa">f</span><span class="s2">"initial_default=</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">initial_default</span><span class="si">!r}</span><span class="s2">"</span><span class="p">)</span> |
| <a id="__codelineno-0-414" name="__codelineno-0-414"></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">write_default</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> |
| <a id="__codelineno-0-415" name="__codelineno-0-415"></a> <span class="n">parts</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="sa">f</span><span class="s2">"write_default=</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">write_default</span><span class="si">!r}</span><span class="s2">"</span><span class="p">)</span> |
| <a id="__codelineno-0-416" name="__codelineno-0-416"></a> |
| <a id="__codelineno-0-417" name="__codelineno-0-417"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"NestedField(</span><span class="si">{</span><span class="s1">', '</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">parts</span><span class="p">)</span><span class="si">}</span><span class="s2">)"</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h3 id="pyiceberg.types.NestedField.__str__" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="fm">__str__</span><span class="p">()</span></code> |
| |
| <a href="#pyiceberg.types.NestedField.__str__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Return the string representation of the NestedField class.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-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></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-398" name="__codelineno-0-398"></a><span class="k">def</span><span class="w"> </span><span class="fm">__str__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> |
| <a id="__codelineno-0-399" name="__codelineno-0-399"></a><span class="w"> </span><span class="sd">"""Return the string representation of the NestedField class."""</span> |
| <a id="__codelineno-0-400" name="__codelineno-0-400"></a> <span class="n">doc</span> <span class="o">=</span> <span class="s2">""</span> <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">doc</span> <span class="k">else</span> <span class="sa">f</span><span class="s2">" (</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">doc</span><span class="si">}</span><span class="s2">)"</span> |
| <a id="__codelineno-0-401" name="__codelineno-0-401"></a> <span class="n">req</span> <span class="o">=</span> <span class="s2">"required"</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">required</span> <span class="k">else</span> <span class="s2">"optional"</span> |
| <a id="__codelineno-0-402" name="__codelineno-0-402"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">field_id</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">name</span><span class="si">}</span><span class="s2">: </span><span class="si">{</span><span class="n">req</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">field_type</span><span class="si">}{</span><span class="n">doc</span><span class="si">}</span><span class="s2">"</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h3 id="pyiceberg.types.NestedField.convert_field_type" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="n">convert_field_type</span><span class="p">(</span><span class="n">v</span><span class="p">)</span></code> |
| |
| <a href="#pyiceberg.types.NestedField.convert_field_type" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Convert string values into IcebergType instances.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-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></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-346" name="__codelineno-0-346"></a><span class="nd">@field_validator</span><span class="p">(</span><span class="s2">"field_type"</span><span class="p">,</span> <span class="n">mode</span><span class="o">=</span><span class="s2">"before"</span><span class="p">)</span> |
| <a id="__codelineno-0-347" name="__codelineno-0-347"></a><span class="k">def</span><span class="w"> </span><span class="nf">convert_field_type</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">v</span><span class="p">:</span> <span class="n">Any</span><span class="p">)</span> <span class="o">-></span> <span class="n">IcebergType</span><span class="p">:</span> |
| <a id="__codelineno-0-348" name="__codelineno-0-348"></a><span class="w"> </span><span class="sd">"""Convert string values into IcebergType instances."""</span> |
| <a id="__codelineno-0-349" name="__codelineno-0-349"></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="nb">str</span><span class="p">):</span> |
| <a id="__codelineno-0-350" name="__codelineno-0-350"></a> <span class="k">try</span><span class="p">:</span> |
| <a id="__codelineno-0-351" name="__codelineno-0-351"></a> <span class="k">return</span> <span class="n">IcebergType</span><span class="o">.</span><span class="n">handle_primitive_type</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> |
| <a id="__codelineno-0-352" name="__codelineno-0-352"></a> <span class="k">except</span> <span class="ne">ValueError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span> |
| <a id="__codelineno-0-353" name="__codelineno-0-353"></a> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Unsupported field type: '</span><span class="si">{</span><span class="n">v</span><span class="si">}</span><span class="s2">'"</span><span class="p">)</span> <span class="kn">from</span><span class="w"> </span><span class="nn">e</span> |
| <a id="__codelineno-0-354" name="__codelineno-0-354"></a> <span class="k">return</span> <span class="n">v</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| |
| |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-class"> |
| |
| |
| |
| <h2 id="pyiceberg.types.PrimitiveType" class="doc doc-heading"> |
| <code>PrimitiveType</code> |
| |
| |
| <a href="#pyiceberg.types.PrimitiveType" class="headerlink" title="Permanent link">¶</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>, <code><a class="autorefs autorefs-internal" title="IcebergRootModel (pyiceberg.typedef.IcebergRootModel)" href="../typedef/#pyiceberg.typedef.IcebergRootModel">IcebergRootModel</a>[<span title="str">str</span>]</code>, <code><a class="autorefs autorefs-internal" title="IcebergType (pyiceberg.types.IcebergType)" href="#pyiceberg.types.IcebergType">IcebergType</a></code></p> |
| |
| |
| <p>Base class for all Iceberg Primitive Types.</p> |
| |
| |
| |
| |
| |
| |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-192">192</a></span> |
| <span class="normal"><a href="#__codelineno-0-193">193</a></span> |
| <span class="normal"><a href="#__codelineno-0-194">194</a></span> |
| <span class="normal"><a href="#__codelineno-0-195">195</a></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-192" name="__codelineno-0-192"></a><span class="k">class</span><span class="w"> </span><span class="nc">PrimitiveType</span><span class="p">(</span><span class="n">Singleton</span><span class="p">,</span> <span class="n">IcebergRootModel</span><span class="p">[</span><span class="nb">str</span><span class="p">],</span> <span class="n">IcebergType</span><span class="p">):</span> |
| <a id="__codelineno-0-193" name="__codelineno-0-193"></a><span class="w"> </span><span class="sd">"""Base class for all Iceberg Primitive Types."""</span> |
| <a id="__codelineno-0-194" name="__codelineno-0-194"></a> |
| <a id="__codelineno-0-195" name="__codelineno-0-195"></a> <span class="n">root</span><span class="p">:</span> <span class="n">Any</span> <span class="o">=</span> <span class="n">Field</span><span class="p">()</span> |
| <a id="__codelineno-0-196" name="__codelineno-0-196"></a> |
| <a id="__codelineno-0-197" name="__codelineno-0-197"></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">-></span> <span class="nb">str</span><span class="p">:</span> |
| <a id="__codelineno-0-198" name="__codelineno-0-198"></a><span class="w"> </span><span class="sd">"""Return the string representation of the PrimitiveType class."""</span> |
| <a id="__codelineno-0-199" name="__codelineno-0-199"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="nb">type</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="vm">__name__</span><span class="si">}</span><span class="s2">()"</span> |
| <a id="__codelineno-0-200" name="__codelineno-0-200"></a> |
| <a id="__codelineno-0-201" name="__codelineno-0-201"></a> <span class="k">def</span><span class="w"> </span><span class="fm">__str__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> |
| <a id="__codelineno-0-202" name="__codelineno-0-202"></a><span class="w"> </span><span class="sd">"""Return the string representation of the PrimitiveType class."""</span> |
| <a id="__codelineno-0-203" name="__codelineno-0-203"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">root</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| |
| |
| |
| <div class="doc doc-children"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h3 id="pyiceberg.types.PrimitiveType.__repr__" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="fm">__repr__</span><span class="p">()</span></code> |
| |
| <a href="#pyiceberg.types.PrimitiveType.__repr__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Return the string representation of the PrimitiveType class.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-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></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-197" name="__codelineno-0-197"></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">-></span> <span class="nb">str</span><span class="p">:</span> |
| <a id="__codelineno-0-198" name="__codelineno-0-198"></a><span class="w"> </span><span class="sd">"""Return the string representation of the PrimitiveType class."""</span> |
| <a id="__codelineno-0-199" name="__codelineno-0-199"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="nb">type</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="vm">__name__</span><span class="si">}</span><span class="s2">()"</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h3 id="pyiceberg.types.PrimitiveType.__str__" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="fm">__str__</span><span class="p">()</span></code> |
| |
| <a href="#pyiceberg.types.PrimitiveType.__str__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Return the string representation of the PrimitiveType class.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-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-201" name="__codelineno-0-201"></a><span class="k">def</span><span class="w"> </span><span class="fm">__str__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> |
| <a id="__codelineno-0-202" name="__codelineno-0-202"></a><span class="w"> </span><span class="sd">"""Return the string representation of the PrimitiveType class."""</span> |
| <a id="__codelineno-0-203" name="__codelineno-0-203"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">root</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| |
| |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-class"> |
| |
| |
| |
| <h2 id="pyiceberg.types.StringType" class="doc doc-heading"> |
| <code>StringType</code> |
| |
| |
| <a href="#pyiceberg.types.StringType" class="headerlink" title="Permanent link">¶</a></h2> |
| |
| |
| <div class="doc doc-contents "> |
| <p class="doc doc-class-bases"> |
| Bases: <code><a class="autorefs autorefs-internal" title="PrimitiveType (pyiceberg.types.PrimitiveType)" href="#pyiceberg.types.PrimitiveType">PrimitiveType</a></code></p> |
| |
| |
| <p>A String data type in Iceberg can be represented using an instance of this class.</p> |
| <p>Strings in Iceberg are arbitrary-length character sequences and are encoded with UTF-8.</p> |
| |
| |
| <details class="example" open> |
| <summary>Example</summary> |
| <blockquote> |
| <blockquote> |
| <blockquote> |
| <p>column_foo = StringType() |
| isinstance(column_foo, StringType) |
| True |
| column_foo |
| StringType()</p> |
| </blockquote> |
| </blockquote> |
| </blockquote> |
| </details> |
| |
| |
| |
| |
| |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-820">820</a></span> |
| <span class="normal"><a href="#__codelineno-0-821">821</a></span> |
| <span class="normal"><a href="#__codelineno-0-822">822</a></span> |
| <span class="normal"><a href="#__codelineno-0-823">823</a></span> |
| <span class="normal"><a href="#__codelineno-0-824">824</a></span> |
| <span class="normal"><a href="#__codelineno-0-825">825</a></span> |
| <span class="normal"><a href="#__codelineno-0-826">826</a></span> |
| <span class="normal"><a href="#__codelineno-0-827">827</a></span> |
| <span class="normal"><a href="#__codelineno-0-828">828</a></span> |
| <span class="normal"><a href="#__codelineno-0-829">829</a></span> |
| <span class="normal"><a href="#__codelineno-0-830">830</a></span> |
| <span class="normal"><a href="#__codelineno-0-831">831</a></span> |
| <span class="normal"><a href="#__codelineno-0-832">832</a></span> |
| <span class="normal"><a href="#__codelineno-0-833">833</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-820" name="__codelineno-0-820"></a><span class="k">class</span><span class="w"> </span><span class="nc">StringType</span><span class="p">(</span><span class="n">PrimitiveType</span><span class="p">):</span> |
| <a id="__codelineno-0-821" name="__codelineno-0-821"></a><span class="w"> </span><span class="sd">"""A String data type in Iceberg can be represented using an instance of this class.</span> |
| <a id="__codelineno-0-822" name="__codelineno-0-822"></a> |
| <a id="__codelineno-0-823" name="__codelineno-0-823"></a><span class="sd"> Strings in Iceberg are arbitrary-length character sequences and are encoded with UTF-8.</span> |
| <a id="__codelineno-0-824" name="__codelineno-0-824"></a> |
| <a id="__codelineno-0-825" name="__codelineno-0-825"></a><span class="sd"> Example:</span> |
| <a id="__codelineno-0-826" name="__codelineno-0-826"></a><span class="sd"> >>> column_foo = StringType()</span> |
| <a id="__codelineno-0-827" name="__codelineno-0-827"></a><span class="sd"> >>> isinstance(column_foo, StringType)</span> |
| <a id="__codelineno-0-828" name="__codelineno-0-828"></a><span class="sd"> True</span> |
| <a id="__codelineno-0-829" name="__codelineno-0-829"></a><span class="sd"> >>> column_foo</span> |
| <a id="__codelineno-0-830" name="__codelineno-0-830"></a><span class="sd"> StringType()</span> |
| <a id="__codelineno-0-831" name="__codelineno-0-831"></a><span class="sd"> """</span> |
| <a id="__codelineno-0-832" name="__codelineno-0-832"></a> |
| <a id="__codelineno-0-833" name="__codelineno-0-833"></a> <span class="n">root</span><span class="p">:</span> <span class="n">Literal</span><span class="p">[</span><span class="s2">"string"</span><span class="p">]</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"string"</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.types.StructType" class="doc doc-heading"> |
| <code>StructType</code> |
| |
| |
| <a href="#pyiceberg.types.StructType" class="headerlink" title="Permanent link">¶</a></h2> |
| |
| |
| <div class="doc doc-contents "> |
| <p class="doc doc-class-bases"> |
| Bases: <code><a class="autorefs autorefs-internal" title="IcebergType (pyiceberg.types.IcebergType)" href="#pyiceberg.types.IcebergType">IcebergType</a></code></p> |
| |
| |
| <p>A struct type in Iceberg.</p> |
| |
| |
| <details class="example" open> |
| <summary>Example</summary> |
| <blockquote> |
| <blockquote> |
| <blockquote> |
| <p>str(StructType( |
| ... NestedField(1, "required_field", StringType(), True), |
| ... NestedField(2, "optional_field", IntegerType()) |
| ... )) |
| 'struct<1: required_field: optional string, 2: optional_field: optional int>'</p> |
| </blockquote> |
| </blockquote> |
| </blockquote> |
| </details> |
| |
| |
| |
| |
| |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-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></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-428" name="__codelineno-0-428"></a><span class="k">class</span><span class="w"> </span><span class="nc">StructType</span><span class="p">(</span><span class="n">IcebergType</span><span class="p">):</span> |
| <a id="__codelineno-0-429" name="__codelineno-0-429"></a><span class="w"> </span><span class="sd">"""A struct type in Iceberg.</span> |
| <a id="__codelineno-0-430" name="__codelineno-0-430"></a> |
| <a id="__codelineno-0-431" name="__codelineno-0-431"></a><span class="sd"> Example:</span> |
| <a id="__codelineno-0-432" name="__codelineno-0-432"></a><span class="sd"> >>> str(StructType(</span> |
| <a id="__codelineno-0-433" name="__codelineno-0-433"></a><span class="sd"> ... NestedField(1, "required_field", StringType(), True),</span> |
| <a id="__codelineno-0-434" name="__codelineno-0-434"></a><span class="sd"> ... NestedField(2, "optional_field", IntegerType())</span> |
| <a id="__codelineno-0-435" name="__codelineno-0-435"></a><span class="sd"> ... ))</span> |
| <a id="__codelineno-0-436" name="__codelineno-0-436"></a><span class="sd"> 'struct<1: required_field: optional string, 2: optional_field: optional int>'</span> |
| <a id="__codelineno-0-437" name="__codelineno-0-437"></a><span class="sd"> """</span> |
| <a id="__codelineno-0-438" name="__codelineno-0-438"></a> |
| <a id="__codelineno-0-439" name="__codelineno-0-439"></a> <span class="nb">type</span><span class="p">:</span> <span class="n">Literal</span><span class="p">[</span><span class="s2">"struct"</span><span class="p">]</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"struct"</span><span class="p">)</span> |
| <a id="__codelineno-0-440" name="__codelineno-0-440"></a> <span class="n">fields</span><span class="p">:</span> <span class="n">Tuple</span><span class="p">[</span><span class="n">NestedField</span><span class="p">,</span> <span class="o">...</span><span class="p">]</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">default_factory</span><span class="o">=</span><span class="nb">tuple</span><span class="p">)</span> |
| <a id="__codelineno-0-441" name="__codelineno-0-441"></a> <span class="n">_hash</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="n">PrivateAttr</span><span class="p">()</span> |
| <a id="__codelineno-0-442" name="__codelineno-0-442"></a> |
| <a id="__codelineno-0-443" name="__codelineno-0-443"></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="o">*</span><span class="n">fields</span><span class="p">:</span> <span class="n">NestedField</span><span class="p">,</span> <span class="o">**</span><span class="n">data</span><span class="p">:</span> <span class="n">Any</span><span class="p">):</span> |
| <a id="__codelineno-0-444" name="__codelineno-0-444"></a> <span class="c1"># In case we use positional arguments, instead of keyword args</span> |
| <a id="__codelineno-0-445" name="__codelineno-0-445"></a> <span class="k">if</span> <span class="n">fields</span><span class="p">:</span> |
| <a id="__codelineno-0-446" name="__codelineno-0-446"></a> <span class="n">data</span><span class="p">[</span><span class="s2">"fields"</span><span class="p">]</span> <span class="o">=</span> <span class="n">fields</span> |
| <a id="__codelineno-0-447" name="__codelineno-0-447"></a> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="o">**</span><span class="n">data</span><span class="p">)</span> |
| <a id="__codelineno-0-448" name="__codelineno-0-448"></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">fields</span><span class="p">)</span> |
| <a id="__codelineno-0-449" name="__codelineno-0-449"></a> |
| <a id="__codelineno-0-450" name="__codelineno-0-450"></a> <span class="k">def</span><span class="w"> </span><span class="nf">field</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">field_id</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-></span> <span class="n">Optional</span><span class="p">[</span><span class="n">NestedField</span><span class="p">]:</span> |
| <a id="__codelineno-0-451" name="__codelineno-0-451"></a> <span class="k">for</span> <span class="n">field</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="p">:</span> |
| <a id="__codelineno-0-452" name="__codelineno-0-452"></a> <span class="k">if</span> <span class="n">field</span><span class="o">.</span><span class="n">field_id</span> <span class="o">==</span> <span class="n">field_id</span><span class="p">:</span> |
| <a id="__codelineno-0-453" name="__codelineno-0-453"></a> <span class="k">return</span> <span class="n">field</span> |
| <a id="__codelineno-0-454" name="__codelineno-0-454"></a> <span class="k">return</span> <span class="kc">None</span> |
| <a id="__codelineno-0-455" name="__codelineno-0-455"></a> |
| <a id="__codelineno-0-456" name="__codelineno-0-456"></a> <span class="k">def</span><span class="w"> </span><span class="nf">field_by_name</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">case_sensitive</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">)</span> <span class="o">-></span> <span class="n">Optional</span><span class="p">[</span><span class="n">NestedField</span><span class="p">]:</span> |
| <a id="__codelineno-0-457" name="__codelineno-0-457"></a> <span class="k">if</span> <span class="n">case_sensitive</span><span class="p">:</span> |
| <a id="__codelineno-0-458" name="__codelineno-0-458"></a> <span class="k">for</span> <span class="n">field</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="p">:</span> |
| <a id="__codelineno-0-459" name="__codelineno-0-459"></a> <span class="k">if</span> <span class="n">field</span><span class="o">.</span><span class="n">name</span> <span class="o">==</span> <span class="n">name</span><span class="p">:</span> |
| <a id="__codelineno-0-460" name="__codelineno-0-460"></a> <span class="k">return</span> <span class="n">field</span> |
| <a id="__codelineno-0-461" name="__codelineno-0-461"></a> <span class="k">else</span><span class="p">:</span> |
| <a id="__codelineno-0-462" name="__codelineno-0-462"></a> <span class="n">name_lower</span> <span class="o">=</span> <span class="n">name</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> |
| <a id="__codelineno-0-463" name="__codelineno-0-463"></a> <span class="k">for</span> <span class="n">field</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="p">:</span> |
| <a id="__codelineno-0-464" name="__codelineno-0-464"></a> <span class="k">if</span> <span class="n">field</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="o">==</span> <span class="n">name_lower</span><span class="p">:</span> |
| <a id="__codelineno-0-465" name="__codelineno-0-465"></a> <span class="k">return</span> <span class="n">field</span> |
| <a id="__codelineno-0-466" name="__codelineno-0-466"></a> <span class="k">return</span> <span class="kc">None</span> |
| <a id="__codelineno-0-467" name="__codelineno-0-467"></a> |
| <a id="__codelineno-0-468" name="__codelineno-0-468"></a> <span class="k">def</span><span class="w"> </span><span class="fm">__str__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> |
| <a id="__codelineno-0-469" name="__codelineno-0-469"></a><span class="w"> </span><span class="sd">"""Return the string representation of the StructType class."""</span> |
| <a id="__codelineno-0-470" name="__codelineno-0-470"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"struct<</span><span class="si">{</span><span class="s1">', '</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="nb">map</span><span class="p">(</span><span class="nb">str</span><span class="p">,</span><span class="w"> </span><span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="p">))</span><span class="si">}</span><span class="s2">>"</span> |
| <a id="__codelineno-0-471" name="__codelineno-0-471"></a> |
| <a id="__codelineno-0-472" name="__codelineno-0-472"></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">-></span> <span class="nb">str</span><span class="p">:</span> |
| <a id="__codelineno-0-473" name="__codelineno-0-473"></a><span class="w"> </span><span class="sd">"""Return the string representation of the StructType class."""</span> |
| <a id="__codelineno-0-474" name="__codelineno-0-474"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"StructType(fields=(</span><span class="si">{</span><span class="s1">', '</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="nb">map</span><span class="p">(</span><span class="nb">repr</span><span class="p">,</span><span class="w"> </span><span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="p">))</span><span class="si">}</span><span class="s2">,))"</span> |
| <a id="__codelineno-0-475" name="__codelineno-0-475"></a> |
| <a id="__codelineno-0-476" name="__codelineno-0-476"></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">-></span> <span class="nb">int</span><span class="p">:</span> |
| <a id="__codelineno-0-477" name="__codelineno-0-477"></a><span class="w"> </span><span class="sd">"""Return the length of an instance of the StructType class."""</span> |
| <a id="__codelineno-0-478" name="__codelineno-0-478"></a> <span class="k">return</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">fields</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">__getnewargs__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">Tuple</span><span class="p">[</span><span class="n">NestedField</span><span class="p">,</span> <span class="o">...</span><span class="p">]:</span> |
| <a id="__codelineno-0-481" name="__codelineno-0-481"></a><span class="w"> </span><span class="sd">"""Pickle the StructType class."""</span> |
| <a id="__codelineno-0-482" name="__codelineno-0-482"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span> |
| <a id="__codelineno-0-483" name="__codelineno-0-483"></a> |
| <a id="__codelineno-0-484" name="__codelineno-0-484"></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">-></span> <span class="nb">int</span><span class="p">:</span> |
| <a id="__codelineno-0-485" name="__codelineno-0-485"></a><span class="w"> </span><span class="sd">"""Use the cache hash value of the StructType class."""</span> |
| <a id="__codelineno-0-486" name="__codelineno-0-486"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_hash</span> |
| <a id="__codelineno-0-487" name="__codelineno-0-487"></a> |
| <a id="__codelineno-0-488" name="__codelineno-0-488"></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">-></span> <span class="nb">bool</span><span class="p">:</span> |
| <a id="__codelineno-0-489" name="__codelineno-0-489"></a><span class="w"> </span><span class="sd">"""Compare the object if it is equal to another object."""</span> |
| <a id="__codelineno-0-490" name="__codelineno-0-490"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span> <span class="o">==</span> <span class="n">other</span><span class="o">.</span><span class="n">fields</span> <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">StructType</span><span class="p">)</span> <span class="k">else</span> <span class="kc">False</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| |
| |
| |
| <div class="doc doc-children"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h3 id="pyiceberg.types.StructType.__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.types.StructType.__eq__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Compare the object if it is equal to another object.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-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></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-488" name="__codelineno-0-488"></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">-></span> <span class="nb">bool</span><span class="p">:</span> |
| <a id="__codelineno-0-489" name="__codelineno-0-489"></a><span class="w"> </span><span class="sd">"""Compare the object if it is equal to another object."""</span> |
| <a id="__codelineno-0-490" name="__codelineno-0-490"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span> <span class="o">==</span> <span class="n">other</span><span class="o">.</span><span class="n">fields</span> <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">StructType</span><span class="p">)</span> <span class="k">else</span> <span class="kc">False</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h3 id="pyiceberg.types.StructType.__getnewargs__" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="n">__getnewargs__</span><span class="p">()</span></code> |
| |
| <a href="#pyiceberg.types.StructType.__getnewargs__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Pickle the StructType class.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-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></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-480" name="__codelineno-0-480"></a><span class="k">def</span><span class="w"> </span><span class="nf">__getnewargs__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">Tuple</span><span class="p">[</span><span class="n">NestedField</span><span class="p">,</span> <span class="o">...</span><span class="p">]:</span> |
| <a id="__codelineno-0-481" name="__codelineno-0-481"></a><span class="w"> </span><span class="sd">"""Pickle the StructType class."""</span> |
| <a id="__codelineno-0-482" name="__codelineno-0-482"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h3 id="pyiceberg.types.StructType.__hash__" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="fm">__hash__</span><span class="p">()</span></code> |
| |
| <a href="#pyiceberg.types.StructType.__hash__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Use the cache hash value of the StructType class.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-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></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-484" name="__codelineno-0-484"></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">-></span> <span class="nb">int</span><span class="p">:</span> |
| <a id="__codelineno-0-485" name="__codelineno-0-485"></a><span class="w"> </span><span class="sd">"""Use the cache hash value of the StructType class."""</span> |
| <a id="__codelineno-0-486" name="__codelineno-0-486"></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.types.StructType.__len__" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="fm">__len__</span><span class="p">()</span></code> |
| |
| <a href="#pyiceberg.types.StructType.__len__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Return the length of an instance of the StructType class.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-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></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-476" name="__codelineno-0-476"></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">-></span> <span class="nb">int</span><span class="p">:</span> |
| <a id="__codelineno-0-477" name="__codelineno-0-477"></a><span class="w"> </span><span class="sd">"""Return the length of an instance of the StructType class."""</span> |
| <a id="__codelineno-0-478" name="__codelineno-0-478"></a> <span class="k">return</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="p">)</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h3 id="pyiceberg.types.StructType.__repr__" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="fm">__repr__</span><span class="p">()</span></code> |
| |
| <a href="#pyiceberg.types.StructType.__repr__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Return the string representation of the StructType class.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-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></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-472" name="__codelineno-0-472"></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">-></span> <span class="nb">str</span><span class="p">:</span> |
| <a id="__codelineno-0-473" name="__codelineno-0-473"></a><span class="w"> </span><span class="sd">"""Return the string representation of the StructType class."""</span> |
| <a id="__codelineno-0-474" name="__codelineno-0-474"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"StructType(fields=(</span><span class="si">{</span><span class="s1">', '</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="nb">map</span><span class="p">(</span><span class="nb">repr</span><span class="p">,</span><span class="w"> </span><span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="p">))</span><span class="si">}</span><span class="s2">,))"</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h3 id="pyiceberg.types.StructType.__str__" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="fm">__str__</span><span class="p">()</span></code> |
| |
| <a href="#pyiceberg.types.StructType.__str__" class="headerlink" title="Permanent link">¶</a></h3> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Return the string representation of the StructType class.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-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></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-468" name="__codelineno-0-468"></a><span class="k">def</span><span class="w"> </span><span class="fm">__str__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> |
| <a id="__codelineno-0-469" name="__codelineno-0-469"></a><span class="w"> </span><span class="sd">"""Return the string representation of the StructType class."""</span> |
| <a id="__codelineno-0-470" name="__codelineno-0-470"></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"struct<</span><span class="si">{</span><span class="s1">', '</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="nb">map</span><span class="p">(</span><span class="nb">str</span><span class="p">,</span><span class="w"> </span><span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="p">))</span><span class="si">}</span><span class="s2">>"</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| |
| |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-class"> |
| |
| |
| |
| <h2 id="pyiceberg.types.TimeType" class="doc doc-heading"> |
| <code>TimeType</code> |
| |
| |
| <a href="#pyiceberg.types.TimeType" class="headerlink" title="Permanent link">¶</a></h2> |
| |
| |
| <div class="doc doc-contents "> |
| <p class="doc doc-class-bases"> |
| Bases: <code><a class="autorefs autorefs-internal" title="PrimitiveType (pyiceberg.types.PrimitiveType)" href="#pyiceberg.types.PrimitiveType">PrimitiveType</a></code></p> |
| |
| |
| <p>A Time data type in Iceberg can be represented using an instance of this class.</p> |
| <p>Times in Iceberg have microsecond precision and are a time of day without a date or timezone.</p> |
| |
| |
| <details class="example" open> |
| <summary>Example</summary> |
| <blockquote> |
| <blockquote> |
| <blockquote> |
| <p>column_foo = TimeType() |
| isinstance(column_foo, TimeType) |
| True |
| column_foo |
| TimeType()</p> |
| </blockquote> |
| </blockquote> |
| </blockquote> |
| </details> |
| |
| |
| |
| |
| |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-734">734</a></span> |
| <span class="normal"><a href="#__codelineno-0-735">735</a></span> |
| <span class="normal"><a href="#__codelineno-0-736">736</a></span> |
| <span class="normal"><a href="#__codelineno-0-737">737</a></span> |
| <span class="normal"><a href="#__codelineno-0-738">738</a></span> |
| <span class="normal"><a href="#__codelineno-0-739">739</a></span> |
| <span class="normal"><a href="#__codelineno-0-740">740</a></span> |
| <span class="normal"><a href="#__codelineno-0-741">741</a></span> |
| <span class="normal"><a href="#__codelineno-0-742">742</a></span> |
| <span class="normal"><a href="#__codelineno-0-743">743</a></span> |
| <span class="normal"><a href="#__codelineno-0-744">744</a></span> |
| <span class="normal"><a href="#__codelineno-0-745">745</a></span> |
| <span class="normal"><a href="#__codelineno-0-746">746</a></span> |
| <span class="normal"><a href="#__codelineno-0-747">747</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-734" name="__codelineno-0-734"></a><span class="k">class</span><span class="w"> </span><span class="nc">TimeType</span><span class="p">(</span><span class="n">PrimitiveType</span><span class="p">):</span> |
| <a id="__codelineno-0-735" name="__codelineno-0-735"></a><span class="w"> </span><span class="sd">"""A Time data type in Iceberg can be represented using an instance of this class.</span> |
| <a id="__codelineno-0-736" name="__codelineno-0-736"></a> |
| <a id="__codelineno-0-737" name="__codelineno-0-737"></a><span class="sd"> Times in Iceberg have microsecond precision and are a time of day without a date or timezone.</span> |
| <a id="__codelineno-0-738" name="__codelineno-0-738"></a> |
| <a id="__codelineno-0-739" name="__codelineno-0-739"></a><span class="sd"> Example:</span> |
| <a id="__codelineno-0-740" name="__codelineno-0-740"></a><span class="sd"> >>> column_foo = TimeType()</span> |
| <a id="__codelineno-0-741" name="__codelineno-0-741"></a><span class="sd"> >>> isinstance(column_foo, TimeType)</span> |
| <a id="__codelineno-0-742" name="__codelineno-0-742"></a><span class="sd"> True</span> |
| <a id="__codelineno-0-743" name="__codelineno-0-743"></a><span class="sd"> >>> column_foo</span> |
| <a id="__codelineno-0-744" name="__codelineno-0-744"></a><span class="sd"> TimeType()</span> |
| <a id="__codelineno-0-745" name="__codelineno-0-745"></a><span class="sd"> """</span> |
| <a id="__codelineno-0-746" name="__codelineno-0-746"></a> |
| <a id="__codelineno-0-747" name="__codelineno-0-747"></a> <span class="n">root</span><span class="p">:</span> <span class="n">Literal</span><span class="p">[</span><span class="s2">"time"</span><span class="p">]</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"time"</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.types.TimestampNanoType" class="doc doc-heading"> |
| <code>TimestampNanoType</code> |
| |
| |
| <a href="#pyiceberg.types.TimestampNanoType" class="headerlink" title="Permanent link">¶</a></h2> |
| |
| |
| <div class="doc doc-contents "> |
| <p class="doc doc-class-bases"> |
| Bases: <code><a class="autorefs autorefs-internal" title="PrimitiveType (pyiceberg.types.PrimitiveType)" href="#pyiceberg.types.PrimitiveType">PrimitiveType</a></code></p> |
| |
| |
| <p>A TimestampNano data type in Iceberg can be represented using an instance of this class.</p> |
| <p>TimestampNanos in Iceberg have nanosecond precision and include a date and a time of day without a timezone.</p> |
| |
| |
| <details class="example" open> |
| <summary>Example</summary> |
| <blockquote> |
| <blockquote> |
| <blockquote> |
| <p>column_foo = TimestampNanoType() |
| isinstance(column_foo, TimestampNanoType) |
| True |
| column_foo |
| TimestampNanoType()</p> |
| </blockquote> |
| </blockquote> |
| </blockquote> |
| </details> |
| |
| |
| |
| |
| |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-782">782</a></span> |
| <span class="normal"><a href="#__codelineno-0-783">783</a></span> |
| <span class="normal"><a href="#__codelineno-0-784">784</a></span> |
| <span class="normal"><a href="#__codelineno-0-785">785</a></span> |
| <span class="normal"><a href="#__codelineno-0-786">786</a></span> |
| <span class="normal"><a href="#__codelineno-0-787">787</a></span> |
| <span class="normal"><a href="#__codelineno-0-788">788</a></span> |
| <span class="normal"><a href="#__codelineno-0-789">789</a></span> |
| <span class="normal"><a href="#__codelineno-0-790">790</a></span> |
| <span class="normal"><a href="#__codelineno-0-791">791</a></span> |
| <span class="normal"><a href="#__codelineno-0-792">792</a></span> |
| <span class="normal"><a href="#__codelineno-0-793">793</a></span> |
| <span class="normal"><a href="#__codelineno-0-794">794</a></span> |
| <span class="normal"><a href="#__codelineno-0-795">795</a></span> |
| <span class="normal"><a href="#__codelineno-0-796">796</a></span> |
| <span class="normal"><a href="#__codelineno-0-797">797</a></span> |
| <span class="normal"><a href="#__codelineno-0-798">798</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-782" name="__codelineno-0-782"></a><span class="k">class</span><span class="w"> </span><span class="nc">TimestampNanoType</span><span class="p">(</span><span class="n">PrimitiveType</span><span class="p">):</span> |
| <a id="__codelineno-0-783" name="__codelineno-0-783"></a><span class="w"> </span><span class="sd">"""A TimestampNano data type in Iceberg can be represented using an instance of this class.</span> |
| <a id="__codelineno-0-784" name="__codelineno-0-784"></a> |
| <a id="__codelineno-0-785" name="__codelineno-0-785"></a><span class="sd"> TimestampNanos in Iceberg have nanosecond precision and include a date and a time of day without a timezone.</span> |
| <a id="__codelineno-0-786" name="__codelineno-0-786"></a> |
| <a id="__codelineno-0-787" name="__codelineno-0-787"></a><span class="sd"> Example:</span> |
| <a id="__codelineno-0-788" name="__codelineno-0-788"></a><span class="sd"> >>> column_foo = TimestampNanoType()</span> |
| <a id="__codelineno-0-789" name="__codelineno-0-789"></a><span class="sd"> >>> isinstance(column_foo, TimestampNanoType)</span> |
| <a id="__codelineno-0-790" name="__codelineno-0-790"></a><span class="sd"> True</span> |
| <a id="__codelineno-0-791" name="__codelineno-0-791"></a><span class="sd"> >>> column_foo</span> |
| <a id="__codelineno-0-792" name="__codelineno-0-792"></a><span class="sd"> TimestampNanoType()</span> |
| <a id="__codelineno-0-793" name="__codelineno-0-793"></a><span class="sd"> """</span> |
| <a id="__codelineno-0-794" name="__codelineno-0-794"></a> |
| <a id="__codelineno-0-795" name="__codelineno-0-795"></a> <span class="n">root</span><span class="p">:</span> <span class="n">Literal</span><span class="p">[</span><span class="s2">"timestamp_ns"</span><span class="p">]</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"timestamp_ns"</span><span class="p">)</span> |
| <a id="__codelineno-0-796" name="__codelineno-0-796"></a> |
| <a id="__codelineno-0-797" name="__codelineno-0-797"></a> <span class="k">def</span><span class="w"> </span><span class="nf">minimum_format_version</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">TableVersion</span><span class="p">:</span> |
| <a id="__codelineno-0-798" name="__codelineno-0-798"></a> <span class="k">return</span> <span class="mi">3</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.types.TimestampType" class="doc doc-heading"> |
| <code>TimestampType</code> |
| |
| |
| <a href="#pyiceberg.types.TimestampType" class="headerlink" title="Permanent link">¶</a></h2> |
| |
| |
| <div class="doc doc-contents "> |
| <p class="doc doc-class-bases"> |
| Bases: <code><a class="autorefs autorefs-internal" title="PrimitiveType (pyiceberg.types.PrimitiveType)" href="#pyiceberg.types.PrimitiveType">PrimitiveType</a></code></p> |
| |
| |
| <p>A Timestamp data type in Iceberg can be represented using an instance of this class.</p> |
| <p>Timestamps in Iceberg have microsecond precision and include a date and a time of day without a timezone.</p> |
| |
| |
| <details class="example" open> |
| <summary>Example</summary> |
| <blockquote> |
| <blockquote> |
| <blockquote> |
| <p>column_foo = TimestampType() |
| isinstance(column_foo, TimestampType) |
| True |
| column_foo |
| TimestampType()</p> |
| </blockquote> |
| </blockquote> |
| </blockquote> |
| </details> |
| |
| |
| |
| |
| |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-750">750</a></span> |
| <span class="normal"><a href="#__codelineno-0-751">751</a></span> |
| <span class="normal"><a href="#__codelineno-0-752">752</a></span> |
| <span class="normal"><a href="#__codelineno-0-753">753</a></span> |
| <span class="normal"><a href="#__codelineno-0-754">754</a></span> |
| <span class="normal"><a href="#__codelineno-0-755">755</a></span> |
| <span class="normal"><a href="#__codelineno-0-756">756</a></span> |
| <span class="normal"><a href="#__codelineno-0-757">757</a></span> |
| <span class="normal"><a href="#__codelineno-0-758">758</a></span> |
| <span class="normal"><a href="#__codelineno-0-759">759</a></span> |
| <span class="normal"><a href="#__codelineno-0-760">760</a></span> |
| <span class="normal"><a href="#__codelineno-0-761">761</a></span> |
| <span class="normal"><a href="#__codelineno-0-762">762</a></span> |
| <span class="normal"><a href="#__codelineno-0-763">763</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-750" name="__codelineno-0-750"></a><span class="k">class</span><span class="w"> </span><span class="nc">TimestampType</span><span class="p">(</span><span class="n">PrimitiveType</span><span class="p">):</span> |
| <a id="__codelineno-0-751" name="__codelineno-0-751"></a><span class="w"> </span><span class="sd">"""A Timestamp data type in Iceberg can be represented using an instance of this class.</span> |
| <a id="__codelineno-0-752" name="__codelineno-0-752"></a> |
| <a id="__codelineno-0-753" name="__codelineno-0-753"></a><span class="sd"> Timestamps in Iceberg have microsecond precision and include a date and a time of day without a timezone.</span> |
| <a id="__codelineno-0-754" name="__codelineno-0-754"></a> |
| <a id="__codelineno-0-755" name="__codelineno-0-755"></a><span class="sd"> Example:</span> |
| <a id="__codelineno-0-756" name="__codelineno-0-756"></a><span class="sd"> >>> column_foo = TimestampType()</span> |
| <a id="__codelineno-0-757" name="__codelineno-0-757"></a><span class="sd"> >>> isinstance(column_foo, TimestampType)</span> |
| <a id="__codelineno-0-758" name="__codelineno-0-758"></a><span class="sd"> True</span> |
| <a id="__codelineno-0-759" name="__codelineno-0-759"></a><span class="sd"> >>> column_foo</span> |
| <a id="__codelineno-0-760" name="__codelineno-0-760"></a><span class="sd"> TimestampType()</span> |
| <a id="__codelineno-0-761" name="__codelineno-0-761"></a><span class="sd"> """</span> |
| <a id="__codelineno-0-762" name="__codelineno-0-762"></a> |
| <a id="__codelineno-0-763" name="__codelineno-0-763"></a> <span class="n">root</span><span class="p">:</span> <span class="n">Literal</span><span class="p">[</span><span class="s2">"timestamp"</span><span class="p">]</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"timestamp"</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.types.TimestamptzNanoType" class="doc doc-heading"> |
| <code>TimestamptzNanoType</code> |
| |
| |
| <a href="#pyiceberg.types.TimestamptzNanoType" class="headerlink" title="Permanent link">¶</a></h2> |
| |
| |
| <div class="doc doc-contents "> |
| <p class="doc doc-class-bases"> |
| Bases: <code><a class="autorefs autorefs-internal" title="PrimitiveType (pyiceberg.types.PrimitiveType)" href="#pyiceberg.types.PrimitiveType">PrimitiveType</a></code></p> |
| |
| |
| <p>A TimestamptzNano data type in Iceberg can be represented using an instance of this class.</p> |
| <p>TimestamptzNanos in Iceberg are stored as UTC and include a date and a time of day with a timezone.</p> |
| |
| |
| <details class="example" open> |
| <summary>Example</summary> |
| <blockquote> |
| <blockquote> |
| <blockquote> |
| <p>column_foo = TimestamptzNanoType() |
| isinstance(column_foo, TimestamptzNanoType) |
| True |
| column_foo |
| TimestamptzNanoType()</p> |
| </blockquote> |
| </blockquote> |
| </blockquote> |
| </details> |
| |
| |
| |
| |
| |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-801">801</a></span> |
| <span class="normal"><a href="#__codelineno-0-802">802</a></span> |
| <span class="normal"><a href="#__codelineno-0-803">803</a></span> |
| <span class="normal"><a href="#__codelineno-0-804">804</a></span> |
| <span class="normal"><a href="#__codelineno-0-805">805</a></span> |
| <span class="normal"><a href="#__codelineno-0-806">806</a></span> |
| <span class="normal"><a href="#__codelineno-0-807">807</a></span> |
| <span class="normal"><a href="#__codelineno-0-808">808</a></span> |
| <span class="normal"><a href="#__codelineno-0-809">809</a></span> |
| <span class="normal"><a href="#__codelineno-0-810">810</a></span> |
| <span class="normal"><a href="#__codelineno-0-811">811</a></span> |
| <span class="normal"><a href="#__codelineno-0-812">812</a></span> |
| <span class="normal"><a href="#__codelineno-0-813">813</a></span> |
| <span class="normal"><a href="#__codelineno-0-814">814</a></span> |
| <span class="normal"><a href="#__codelineno-0-815">815</a></span> |
| <span class="normal"><a href="#__codelineno-0-816">816</a></span> |
| <span class="normal"><a href="#__codelineno-0-817">817</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-801" name="__codelineno-0-801"></a><span class="k">class</span><span class="w"> </span><span class="nc">TimestamptzNanoType</span><span class="p">(</span><span class="n">PrimitiveType</span><span class="p">):</span> |
| <a id="__codelineno-0-802" name="__codelineno-0-802"></a><span class="w"> </span><span class="sd">"""A TimestamptzNano data type in Iceberg can be represented using an instance of this class.</span> |
| <a id="__codelineno-0-803" name="__codelineno-0-803"></a> |
| <a id="__codelineno-0-804" name="__codelineno-0-804"></a><span class="sd"> TimestamptzNanos in Iceberg are stored as UTC and include a date and a time of day with a timezone.</span> |
| <a id="__codelineno-0-805" name="__codelineno-0-805"></a> |
| <a id="__codelineno-0-806" name="__codelineno-0-806"></a><span class="sd"> Example:</span> |
| <a id="__codelineno-0-807" name="__codelineno-0-807"></a><span class="sd"> >>> column_foo = TimestamptzNanoType()</span> |
| <a id="__codelineno-0-808" name="__codelineno-0-808"></a><span class="sd"> >>> isinstance(column_foo, TimestamptzNanoType)</span> |
| <a id="__codelineno-0-809" name="__codelineno-0-809"></a><span class="sd"> True</span> |
| <a id="__codelineno-0-810" name="__codelineno-0-810"></a><span class="sd"> >>> column_foo</span> |
| <a id="__codelineno-0-811" name="__codelineno-0-811"></a><span class="sd"> TimestamptzNanoType()</span> |
| <a id="__codelineno-0-812" name="__codelineno-0-812"></a><span class="sd"> """</span> |
| <a id="__codelineno-0-813" name="__codelineno-0-813"></a> |
| <a id="__codelineno-0-814" name="__codelineno-0-814"></a> <span class="n">root</span><span class="p">:</span> <span class="n">Literal</span><span class="p">[</span><span class="s2">"timestamptz_ns"</span><span class="p">]</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"timestamptz_ns"</span><span class="p">)</span> |
| <a id="__codelineno-0-815" name="__codelineno-0-815"></a> |
| <a id="__codelineno-0-816" name="__codelineno-0-816"></a> <span class="k">def</span><span class="w"> </span><span class="nf">minimum_format_version</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">TableVersion</span><span class="p">:</span> |
| <a id="__codelineno-0-817" name="__codelineno-0-817"></a> <span class="k">return</span> <span class="mi">3</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.types.TimestamptzType" class="doc doc-heading"> |
| <code>TimestamptzType</code> |
| |
| |
| <a href="#pyiceberg.types.TimestamptzType" class="headerlink" title="Permanent link">¶</a></h2> |
| |
| |
| <div class="doc doc-contents "> |
| <p class="doc doc-class-bases"> |
| Bases: <code><a class="autorefs autorefs-internal" title="PrimitiveType (pyiceberg.types.PrimitiveType)" href="#pyiceberg.types.PrimitiveType">PrimitiveType</a></code></p> |
| |
| |
| <p>A Timestamptz data type in Iceberg can be represented using an instance of this class.</p> |
| <p>Timestamptzs in Iceberg are stored as UTC and include a date and a time of day with a timezone.</p> |
| |
| |
| <details class="example" open> |
| <summary>Example</summary> |
| <blockquote> |
| <blockquote> |
| <blockquote> |
| <p>column_foo = TimestamptzType() |
| isinstance(column_foo, TimestamptzType) |
| True |
| column_foo |
| TimestamptzType()</p> |
| </blockquote> |
| </blockquote> |
| </blockquote> |
| </details> |
| |
| |
| |
| |
| |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-766">766</a></span> |
| <span class="normal"><a href="#__codelineno-0-767">767</a></span> |
| <span class="normal"><a href="#__codelineno-0-768">768</a></span> |
| <span class="normal"><a href="#__codelineno-0-769">769</a></span> |
| <span class="normal"><a href="#__codelineno-0-770">770</a></span> |
| <span class="normal"><a href="#__codelineno-0-771">771</a></span> |
| <span class="normal"><a href="#__codelineno-0-772">772</a></span> |
| <span class="normal"><a href="#__codelineno-0-773">773</a></span> |
| <span class="normal"><a href="#__codelineno-0-774">774</a></span> |
| <span class="normal"><a href="#__codelineno-0-775">775</a></span> |
| <span class="normal"><a href="#__codelineno-0-776">776</a></span> |
| <span class="normal"><a href="#__codelineno-0-777">777</a></span> |
| <span class="normal"><a href="#__codelineno-0-778">778</a></span> |
| <span class="normal"><a href="#__codelineno-0-779">779</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-766" name="__codelineno-0-766"></a><span class="k">class</span><span class="w"> </span><span class="nc">TimestamptzType</span><span class="p">(</span><span class="n">PrimitiveType</span><span class="p">):</span> |
| <a id="__codelineno-0-767" name="__codelineno-0-767"></a><span class="w"> </span><span class="sd">"""A Timestamptz data type in Iceberg can be represented using an instance of this class.</span> |
| <a id="__codelineno-0-768" name="__codelineno-0-768"></a> |
| <a id="__codelineno-0-769" name="__codelineno-0-769"></a><span class="sd"> Timestamptzs in Iceberg are stored as UTC and include a date and a time of day with a timezone.</span> |
| <a id="__codelineno-0-770" name="__codelineno-0-770"></a> |
| <a id="__codelineno-0-771" name="__codelineno-0-771"></a><span class="sd"> Example:</span> |
| <a id="__codelineno-0-772" name="__codelineno-0-772"></a><span class="sd"> >>> column_foo = TimestamptzType()</span> |
| <a id="__codelineno-0-773" name="__codelineno-0-773"></a><span class="sd"> >>> isinstance(column_foo, TimestamptzType)</span> |
| <a id="__codelineno-0-774" name="__codelineno-0-774"></a><span class="sd"> True</span> |
| <a id="__codelineno-0-775" name="__codelineno-0-775"></a><span class="sd"> >>> column_foo</span> |
| <a id="__codelineno-0-776" name="__codelineno-0-776"></a><span class="sd"> TimestamptzType()</span> |
| <a id="__codelineno-0-777" name="__codelineno-0-777"></a><span class="sd"> """</span> |
| <a id="__codelineno-0-778" name="__codelineno-0-778"></a> |
| <a id="__codelineno-0-779" name="__codelineno-0-779"></a> <span class="n">root</span><span class="p">:</span> <span class="n">Literal</span><span class="p">[</span><span class="s2">"timestamptz"</span><span class="p">]</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"timestamptz"</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.types.UUIDType" class="doc doc-heading"> |
| <code>UUIDType</code> |
| |
| |
| <a href="#pyiceberg.types.UUIDType" class="headerlink" title="Permanent link">¶</a></h2> |
| |
| |
| <div class="doc doc-contents "> |
| <p class="doc doc-class-bases"> |
| Bases: <code><a class="autorefs autorefs-internal" title="PrimitiveType (pyiceberg.types.PrimitiveType)" href="#pyiceberg.types.PrimitiveType">PrimitiveType</a></code></p> |
| |
| |
| <p>A UUID data type in Iceberg can be represented using an instance of this class.</p> |
| <p>UUIDs in Iceberg are universally unique identifiers.</p> |
| |
| |
| <details class="example" open> |
| <summary>Example</summary> |
| <blockquote> |
| <blockquote> |
| <blockquote> |
| <p>column_foo = UUIDType() |
| isinstance(column_foo, UUIDType) |
| True |
| column_foo |
| UUIDType()</p> |
| </blockquote> |
| </blockquote> |
| </blockquote> |
| </details> |
| |
| |
| |
| |
| |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-836">836</a></span> |
| <span class="normal"><a href="#__codelineno-0-837">837</a></span> |
| <span class="normal"><a href="#__codelineno-0-838">838</a></span> |
| <span class="normal"><a href="#__codelineno-0-839">839</a></span> |
| <span class="normal"><a href="#__codelineno-0-840">840</a></span> |
| <span class="normal"><a href="#__codelineno-0-841">841</a></span> |
| <span class="normal"><a href="#__codelineno-0-842">842</a></span> |
| <span class="normal"><a href="#__codelineno-0-843">843</a></span> |
| <span class="normal"><a href="#__codelineno-0-844">844</a></span> |
| <span class="normal"><a href="#__codelineno-0-845">845</a></span> |
| <span class="normal"><a href="#__codelineno-0-846">846</a></span> |
| <span class="normal"><a href="#__codelineno-0-847">847</a></span> |
| <span class="normal"><a href="#__codelineno-0-848">848</a></span> |
| <span class="normal"><a href="#__codelineno-0-849">849</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-836" name="__codelineno-0-836"></a><span class="k">class</span><span class="w"> </span><span class="nc">UUIDType</span><span class="p">(</span><span class="n">PrimitiveType</span><span class="p">):</span> |
| <a id="__codelineno-0-837" name="__codelineno-0-837"></a><span class="w"> </span><span class="sd">"""A UUID data type in Iceberg can be represented using an instance of this class.</span> |
| <a id="__codelineno-0-838" name="__codelineno-0-838"></a> |
| <a id="__codelineno-0-839" name="__codelineno-0-839"></a><span class="sd"> UUIDs in Iceberg are universally unique identifiers.</span> |
| <a id="__codelineno-0-840" name="__codelineno-0-840"></a> |
| <a id="__codelineno-0-841" name="__codelineno-0-841"></a><span class="sd"> Example:</span> |
| <a id="__codelineno-0-842" name="__codelineno-0-842"></a><span class="sd"> >>> column_foo = UUIDType()</span> |
| <a id="__codelineno-0-843" name="__codelineno-0-843"></a><span class="sd"> >>> isinstance(column_foo, UUIDType)</span> |
| <a id="__codelineno-0-844" name="__codelineno-0-844"></a><span class="sd"> True</span> |
| <a id="__codelineno-0-845" name="__codelineno-0-845"></a><span class="sd"> >>> column_foo</span> |
| <a id="__codelineno-0-846" name="__codelineno-0-846"></a><span class="sd"> UUIDType()</span> |
| <a id="__codelineno-0-847" name="__codelineno-0-847"></a><span class="sd"> """</span> |
| <a id="__codelineno-0-848" name="__codelineno-0-848"></a> |
| <a id="__codelineno-0-849" name="__codelineno-0-849"></a> <span class="n">root</span><span class="p">:</span> <span class="n">Literal</span><span class="p">[</span><span class="s2">"uuid"</span><span class="p">]</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"uuid"</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.types.UnknownType" class="doc doc-heading"> |
| <code>UnknownType</code> |
| |
| |
| <a href="#pyiceberg.types.UnknownType" class="headerlink" title="Permanent link">¶</a></h2> |
| |
| |
| <div class="doc doc-contents "> |
| <p class="doc doc-class-bases"> |
| Bases: <code><a class="autorefs autorefs-internal" title="PrimitiveType (pyiceberg.types.PrimitiveType)" href="#pyiceberg.types.PrimitiveType">PrimitiveType</a></code></p> |
| |
| |
| <p>An unknown data type in Iceberg can be represented using an instance of this class.</p> |
| <p>Unknowns in Iceberg are used to represent data types that are not known at the time of writing.</p> |
| |
| |
| <details class="example" open> |
| <summary>Example</summary> |
| <blockquote> |
| <blockquote> |
| <blockquote> |
| <p>column_foo = UnknownType() |
| isinstance(column_foo, UnknownType) |
| True |
| column_foo |
| UnknownType()</p> |
| </blockquote> |
| </blockquote> |
| </blockquote> |
| </details> |
| |
| |
| |
| |
| |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-868">868</a></span> |
| <span class="normal"><a href="#__codelineno-0-869">869</a></span> |
| <span class="normal"><a href="#__codelineno-0-870">870</a></span> |
| <span class="normal"><a href="#__codelineno-0-871">871</a></span> |
| <span class="normal"><a href="#__codelineno-0-872">872</a></span> |
| <span class="normal"><a href="#__codelineno-0-873">873</a></span> |
| <span class="normal"><a href="#__codelineno-0-874">874</a></span> |
| <span class="normal"><a href="#__codelineno-0-875">875</a></span> |
| <span class="normal"><a href="#__codelineno-0-876">876</a></span> |
| <span class="normal"><a href="#__codelineno-0-877">877</a></span> |
| <span class="normal"><a href="#__codelineno-0-878">878</a></span> |
| <span class="normal"><a href="#__codelineno-0-879">879</a></span> |
| <span class="normal"><a href="#__codelineno-0-880">880</a></span> |
| <span class="normal"><a href="#__codelineno-0-881">881</a></span> |
| <span class="normal"><a href="#__codelineno-0-882">882</a></span> |
| <span class="normal"><a href="#__codelineno-0-883">883</a></span> |
| <span class="normal"><a href="#__codelineno-0-884">884</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-868" name="__codelineno-0-868"></a><span class="k">class</span><span class="w"> </span><span class="nc">UnknownType</span><span class="p">(</span><span class="n">PrimitiveType</span><span class="p">):</span> |
| <a id="__codelineno-0-869" name="__codelineno-0-869"></a><span class="w"> </span><span class="sd">"""An unknown data type in Iceberg can be represented using an instance of this class.</span> |
| <a id="__codelineno-0-870" name="__codelineno-0-870"></a> |
| <a id="__codelineno-0-871" name="__codelineno-0-871"></a><span class="sd"> Unknowns in Iceberg are used to represent data types that are not known at the time of writing.</span> |
| <a id="__codelineno-0-872" name="__codelineno-0-872"></a> |
| <a id="__codelineno-0-873" name="__codelineno-0-873"></a><span class="sd"> Example:</span> |
| <a id="__codelineno-0-874" name="__codelineno-0-874"></a><span class="sd"> >>> column_foo = UnknownType()</span> |
| <a id="__codelineno-0-875" name="__codelineno-0-875"></a><span class="sd"> >>> isinstance(column_foo, UnknownType)</span> |
| <a id="__codelineno-0-876" name="__codelineno-0-876"></a><span class="sd"> True</span> |
| <a id="__codelineno-0-877" name="__codelineno-0-877"></a><span class="sd"> >>> column_foo</span> |
| <a id="__codelineno-0-878" name="__codelineno-0-878"></a><span class="sd"> UnknownType()</span> |
| <a id="__codelineno-0-879" name="__codelineno-0-879"></a><span class="sd"> """</span> |
| <a id="__codelineno-0-880" name="__codelineno-0-880"></a> |
| <a id="__codelineno-0-881" name="__codelineno-0-881"></a> <span class="n">root</span><span class="p">:</span> <span class="n">Literal</span><span class="p">[</span><span class="s2">"unknown"</span><span class="p">]</span> <span class="o">=</span> <span class="n">Field</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"unknown"</span><span class="p">)</span> |
| <a id="__codelineno-0-882" name="__codelineno-0-882"></a> |
| <a id="__codelineno-0-883" name="__codelineno-0-883"></a> <span class="k">def</span><span class="w"> </span><span class="nf">minimum_format_version</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">TableVersion</span><span class="p">:</span> |
| <a id="__codelineno-0-884" name="__codelineno-0-884"></a> <span class="k">return</span> <span class="mi">3</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| |
| |
| |
| <div class="doc doc-children"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h2 id="pyiceberg.types.strtobool" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="n">strtobool</span><span class="p">(</span><span class="n">val</span><span class="p">)</span></code> |
| |
| <a href="#pyiceberg.types.strtobool" class="headerlink" title="Permanent link">¶</a></h2> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Convert a string representation of truth to true (1) or false (0).</p> |
| <p>True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values |
| are 'n', 'no', 'f', 'false', 'off', and '0'. Raises ValueError if |
| 'val' is anything else.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-98"> 98</a></span> |
| <span class="normal"><a href="#__codelineno-0-99"> 99</a></span> |
| <span class="normal"><a href="#__codelineno-0-100">100</a></span> |
| <span class="normal"><a href="#__codelineno-0-101">101</a></span> |
| <span class="normal"><a href="#__codelineno-0-102">102</a></span> |
| <span class="normal"><a href="#__codelineno-0-103">103</a></span> |
| <span class="normal"><a href="#__codelineno-0-104">104</a></span> |
| <span class="normal"><a href="#__codelineno-0-105">105</a></span> |
| <span class="normal"><a href="#__codelineno-0-106">106</a></span> |
| <span class="normal"><a href="#__codelineno-0-107">107</a></span> |
| <span class="normal"><a href="#__codelineno-0-108">108</a></span> |
| <span class="normal"><a href="#__codelineno-0-109">109</a></span> |
| <span class="normal"><a href="#__codelineno-0-110">110</a></span> |
| <span class="normal"><a href="#__codelineno-0-111">111</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-98" name="__codelineno-0-98"></a><span class="k">def</span><span class="w"> </span><span class="nf">strtobool</span><span class="p">(</span><span class="n">val</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="nb">bool</span><span class="p">:</span> |
| <a id="__codelineno-0-99" name="__codelineno-0-99"></a><span class="w"> </span><span class="sd">"""Convert a string representation of truth to true (1) or false (0).</span> |
| <a id="__codelineno-0-100" name="__codelineno-0-100"></a> |
| <a id="__codelineno-0-101" name="__codelineno-0-101"></a><span class="sd"> True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values</span> |
| <a id="__codelineno-0-102" name="__codelineno-0-102"></a><span class="sd"> are 'n', 'no', 'f', 'false', 'off', and '0'. Raises ValueError if</span> |
| <a id="__codelineno-0-103" name="__codelineno-0-103"></a><span class="sd"> 'val' is anything else.</span> |
| <a id="__codelineno-0-104" name="__codelineno-0-104"></a><span class="sd"> """</span> |
| <a id="__codelineno-0-105" name="__codelineno-0-105"></a> <span class="n">val</span> <span class="o">=</span> <span class="n">val</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> |
| <a id="__codelineno-0-106" name="__codelineno-0-106"></a> <span class="k">if</span> <span class="n">val</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">"y"</span><span class="p">,</span> <span class="s2">"yes"</span><span class="p">,</span> <span class="s2">"t"</span><span class="p">,</span> <span class="s2">"true"</span><span class="p">,</span> <span class="s2">"on"</span><span class="p">,</span> <span class="s2">"1"</span><span class="p">):</span> |
| <a id="__codelineno-0-107" name="__codelineno-0-107"></a> <span class="k">return</span> <span class="kc">True</span> |
| <a id="__codelineno-0-108" name="__codelineno-0-108"></a> <span class="k">elif</span> <span class="n">val</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">"n"</span><span class="p">,</span> <span class="s2">"no"</span><span class="p">,</span> <span class="s2">"f"</span><span class="p">,</span> <span class="s2">"false"</span><span class="p">,</span> <span class="s2">"off"</span><span class="p">,</span> <span class="s2">"0"</span><span class="p">):</span> |
| <a id="__codelineno-0-109" name="__codelineno-0-109"></a> <span class="k">return</span> <span class="kc">False</span> |
| <a id="__codelineno-0-110" name="__codelineno-0-110"></a> <span class="k">else</span><span class="p">:</span> |
| <a id="__codelineno-0-111" name="__codelineno-0-111"></a> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Invalid truth value: </span><span class="si">{</span><span class="n">val</span><span class="si">!r}</span><span class="s2">"</span><span class="p">)</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </div> |
| |
| </div> |
| |
| <div class="doc doc-object doc-function"> |
| |
| |
| <h2 id="pyiceberg.types.transform_dict_value_to_str" class="doc doc-heading"> |
| <code class="highlight language-python"><span class="n">transform_dict_value_to_str</span><span class="p">(</span><span class="nb">dict</span><span class="p">)</span></code> |
| |
| <a href="#pyiceberg.types.transform_dict_value_to_str" class="headerlink" title="Permanent link">¶</a></h2> |
| |
| |
| <div class="doc doc-contents "> |
| |
| <p>Transform all values in the dictionary to string. Raise an error if any value is None.</p> |
| |
| |
| <details class="quote"> |
| <summary>Source code in <code>pyiceberg/types.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-68">68</a></span> |
| <span class="normal"><a href="#__codelineno-0-69">69</a></span> |
| <span class="normal"><a href="#__codelineno-0-70">70</a></span> |
| <span class="normal"><a href="#__codelineno-0-71">71</a></span> |
| <span class="normal"><a href="#__codelineno-0-72">72</a></span> |
| <span class="normal"><a href="#__codelineno-0-73">73</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-68" name="__codelineno-0-68"></a><span class="k">def</span><span class="w"> </span><span class="nf">transform_dict_value_to_str</span><span class="p">(</span><span class="nb">dict</span><span class="p">:</span> <span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">])</span> <span class="o">-></span> <span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]:</span> |
| <a id="__codelineno-0-69" name="__codelineno-0-69"></a><span class="w"> </span><span class="sd">"""Transform all values in the dictionary to string. Raise an error if any value is None."""</span> |
| <a id="__codelineno-0-70" name="__codelineno-0-70"></a> <span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="nb">dict</span><span class="o">.</span><span class="n">items</span><span class="p">():</span> |
| <a id="__codelineno-0-71" name="__codelineno-0-71"></a> <span class="k">if</span> <span class="n">value</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> |
| <a id="__codelineno-0-72" name="__codelineno-0-72"></a> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"None type is not a supported value in properties: </span><span class="si">{</span><span class="n">key</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span> |
| <a id="__codelineno-0-73" name="__codelineno-0-73"></a> <span class="k">return</span> <span class="p">{</span><span class="n">k</span><span class="p">:</span> <span class="nb">str</span><span class="p">(</span><span class="n">v</span><span class="p">)</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="nb">bool</span><span class="p">)</span> <span class="k">else</span> <span class="nb">str</span><span class="p">(</span><span class="n">v</span><span class="p">)</span> <span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">v</span> <span class="ow">in</span> <span class="nb">dict</span><span class="o">.</span><span class="n">items</span><span class="p">()}</span> |
| </code></pre></div></td></tr></table></div> |
| </details> |
| </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> |