blob: e94f27764e24c2db7de5f3c5bbf14be010374702 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_231) on Tue Jan 26 14:32:16 PST 2021 -->
<title>TypeUtil</title>
<meta name="date" content="2021-01-26">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="TypeUtil";
}
}
catch(err) {
}
//-->
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/iceberg/types/Types.UUIDType.html" title="class in org.apache.iceberg.types"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/iceberg/types/TypeUtil.CustomOrderSchemaVisitor.html" title="class in org.apache.iceberg.types"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/iceberg/types/TypeUtil.html" target="_top">Frames</a></li>
<li><a href="TypeUtil.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.iceberg.types</div>
<h2 title="Class TypeUtil" class="title">Class TypeUtil</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.iceberg.types.TypeUtil</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel">TypeUtil</span>
extends java.lang.Object</pre>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.CustomOrderSchemaVisitor.html" title="class in org.apache.iceberg.types">TypeUtil.CustomOrderSchemaVisitor</a>&lt;<a href="../../../../org/apache/iceberg/types/TypeUtil.CustomOrderSchemaVisitor.html" title="type parameter in TypeUtil.CustomOrderSchemaVisitor">T</a>&gt;</span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.NextID.html" title="interface in org.apache.iceberg.types">TypeUtil.NextID</a></span></code>
<div class="block">Interface for passing a function that assigns column IDs.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.SchemaVisitor.html" title="class in org.apache.iceberg.types">TypeUtil.SchemaVisitor</a>&lt;<a href="../../../../org/apache/iceberg/types/TypeUtil.SchemaVisitor.html" title="type parameter in TypeUtil.SchemaVisitor">T</a>&gt;</span></code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.html#assignFreshIds-org.apache.iceberg.Schema-org.apache.iceberg.Schema-org.apache.iceberg.types.TypeUtil.NextID-">assignFreshIds</a></span>(<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;schema,
<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;baseSchema,
<a href="../../../../org/apache/iceberg/types/TypeUtil.NextID.html" title="interface in org.apache.iceberg.types">TypeUtil.NextID</a>&nbsp;nextId)</code>
<div class="block">Assigns ids to match a given schema, and fresh ids from the <a href="../../../../org/apache/iceberg/types/TypeUtil.NextID.html" title="interface in org.apache.iceberg.types"><code>nextId function</code></a> for all other fields.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.html#assignFreshIds-org.apache.iceberg.Schema-org.apache.iceberg.types.TypeUtil.NextID-">assignFreshIds</a></span>(<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;schema,
<a href="../../../../org/apache/iceberg/types/TypeUtil.NextID.html" title="interface in org.apache.iceberg.types">TypeUtil.NextID</a>&nbsp;nextId)</code>
<div class="block">Assigns fresh ids from the <a href="../../../../org/apache/iceberg/types/TypeUtil.NextID.html" title="interface in org.apache.iceberg.types"><code>nextId function</code></a> for all fields in a schema.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/iceberg/types/Type.html" title="interface in org.apache.iceberg.types">Type</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.html#assignFreshIds-org.apache.iceberg.types.Type-org.apache.iceberg.types.TypeUtil.NextID-">assignFreshIds</a></span>(<a href="../../../../org/apache/iceberg/types/Type.html" title="interface in org.apache.iceberg.types">Type</a>&nbsp;type,
<a href="../../../../org/apache/iceberg/types/TypeUtil.NextID.html" title="interface in org.apache.iceberg.types">TypeUtil.NextID</a>&nbsp;nextId)</code>
<div class="block">Assigns fresh ids from the <a href="../../../../org/apache/iceberg/types/TypeUtil.NextID.html" title="interface in org.apache.iceberg.types"><code>nextId function</code></a> for all fields in a type.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.html#assignIncreasingFreshIds-org.apache.iceberg.Schema-">assignIncreasingFreshIds</a></span>(<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;schema)</code>
<div class="block">Assigns strictly increasing fresh ids for all fields in a schema, starting from 1.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.html#decimalRequiredBytes-int-">decimalRequiredBytes</a></span>(int&nbsp;precision)</code>&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/iceberg/types/Type.html" title="interface in org.apache.iceberg.types">Type</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.html#find-org.apache.iceberg.Schema-java.util.function.Predicate-">find</a></span>(<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;schema,
java.util.function.Predicate&lt;<a href="../../../../org/apache/iceberg/types/Type.html" title="interface in org.apache.iceberg.types">Type</a>&gt;&nbsp;predicate)</code>&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static java.util.Set&lt;java.lang.Integer&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.html#getProjectedIds-org.apache.iceberg.Schema-">getProjectedIds</a></span>(<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;schema)</code>&nbsp;</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static java.util.Set&lt;java.lang.Integer&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.html#getProjectedIds-org.apache.iceberg.types.Type-">getProjectedIds</a></span>(<a href="../../../../org/apache/iceberg/types/Type.html" title="interface in org.apache.iceberg.types">Type</a>&nbsp;type)</code>&nbsp;</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static java.util.Map&lt;java.lang.Integer,<a href="../../../../org/apache/iceberg/types/Types.NestedField.html" title="class in org.apache.iceberg.types">Types.NestedField</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.html#indexById-org.apache.iceberg.types.Types.StructType-">indexById</a></span>(<a href="../../../../org/apache/iceberg/types/Types.StructType.html" title="class in org.apache.iceberg.types">Types.StructType</a>&nbsp;struct)</code>&nbsp;</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static java.util.Map&lt;java.lang.String,java.lang.Integer&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.html#indexByLowerCaseName-org.apache.iceberg.types.Types.StructType-">indexByLowerCaseName</a></span>(<a href="../../../../org/apache/iceberg/types/Types.StructType.html" title="class in org.apache.iceberg.types">Types.StructType</a>&nbsp;struct)</code>&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static java.util.Map&lt;java.lang.String,java.lang.Integer&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.html#indexByName-org.apache.iceberg.types.Types.StructType-">indexByName</a></span>(<a href="../../../../org/apache/iceberg/types/Types.StructType.html" title="class in org.apache.iceberg.types">Types.StructType</a>&nbsp;struct)</code>&nbsp;</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static java.util.Map&lt;java.lang.Integer,java.lang.String&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.html#indexNameById-org.apache.iceberg.types.Types.StructType-">indexNameById</a></span>(<a href="../../../../org/apache/iceberg/types/Types.StructType.html" title="class in org.apache.iceberg.types">Types.StructType</a>&nbsp;struct)</code>&nbsp;</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static java.util.Map&lt;java.lang.Integer,java.lang.Integer&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.html#indexParents-org.apache.iceberg.types.Types.StructType-">indexParents</a></span>(<a href="../../../../org/apache/iceberg/types/Types.StructType.html" title="class in org.apache.iceberg.types">Types.StructType</a>&nbsp;struct)</code>&nbsp;</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.html#isPromotionAllowed-org.apache.iceberg.types.Type-org.apache.iceberg.types.Type.PrimitiveType-">isPromotionAllowed</a></span>(<a href="../../../../org/apache/iceberg/types/Type.html" title="interface in org.apache.iceberg.types">Type</a>&nbsp;from,
<a href="../../../../org/apache/iceberg/types/Type.PrimitiveType.html" title="class in org.apache.iceberg.types">Type.PrimitiveType</a>&nbsp;to)</code>&nbsp;</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.html#join-org.apache.iceberg.Schema-org.apache.iceberg.Schema-">join</a></span>(<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;left,
<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;right)</code>&nbsp;</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.html#reassignIds-org.apache.iceberg.Schema-org.apache.iceberg.Schema-">reassignIds</a></span>(<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;schema,
<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;idSourceSchema)</code>
<div class="block">Reassigns ids in a schema from another schema.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.html#select-org.apache.iceberg.Schema-java.util.Set-">select</a></span>(<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;schema,
java.util.Set&lt;java.lang.Integer&gt;&nbsp;fieldIds)</code>&nbsp;</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/iceberg/types/Types.StructType.html" title="class in org.apache.iceberg.types">Types.StructType</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.html#select-org.apache.iceberg.types.Types.StructType-java.util.Set-">select</a></span>(<a href="../../../../org/apache/iceberg/types/Types.StructType.html" title="class in org.apache.iceberg.types">Types.StructType</a>&nbsp;struct,
java.util.Set&lt;java.lang.Integer&gt;&nbsp;fieldIds)</code>&nbsp;</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.html#selectNot-org.apache.iceberg.Schema-java.util.Set-">selectNot</a></span>(<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;schema,
java.util.Set&lt;java.lang.Integer&gt;&nbsp;fieldIds)</code>&nbsp;</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/iceberg/types/Types.StructType.html" title="class in org.apache.iceberg.types">Types.StructType</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.html#selectNot-org.apache.iceberg.types.Types.StructType-java.util.Set-">selectNot</a></span>(<a href="../../../../org/apache/iceberg/types/Types.StructType.html" title="class in org.apache.iceberg.types">Types.StructType</a>&nbsp;struct,
java.util.Set&lt;java.lang.Integer&gt;&nbsp;fieldIds)</code>&nbsp;</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.html#validateWriteSchema-org.apache.iceberg.Schema-org.apache.iceberg.Schema-java.lang.Boolean-java.lang.Boolean-">validateWriteSchema</a></span>(<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;tableSchema,
<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;writeSchema,
java.lang.Boolean&nbsp;checkNullability,
java.lang.Boolean&nbsp;checkOrdering)</code>
<div class="block">Check whether we could write the iceberg table with the user-provided write schema.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;T</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.html#visit-org.apache.iceberg.Schema-org.apache.iceberg.types.TypeUtil.CustomOrderSchemaVisitor-">visit</a></span>(<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;schema,
<a href="../../../../org/apache/iceberg/types/TypeUtil.CustomOrderSchemaVisitor.html" title="class in org.apache.iceberg.types">TypeUtil.CustomOrderSchemaVisitor</a>&lt;T&gt;&nbsp;visitor)</code>&nbsp;</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;T</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.html#visit-org.apache.iceberg.Schema-org.apache.iceberg.types.TypeUtil.SchemaVisitor-">visit</a></span>(<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;schema,
<a href="../../../../org/apache/iceberg/types/TypeUtil.SchemaVisitor.html" title="class in org.apache.iceberg.types">TypeUtil.SchemaVisitor</a>&lt;T&gt;&nbsp;visitor)</code>&nbsp;</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;T</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.html#visit-org.apache.iceberg.types.Type-org.apache.iceberg.types.TypeUtil.CustomOrderSchemaVisitor-">visit</a></span>(<a href="../../../../org/apache/iceberg/types/Type.html" title="interface in org.apache.iceberg.types">Type</a>&nbsp;type,
<a href="../../../../org/apache/iceberg/types/TypeUtil.CustomOrderSchemaVisitor.html" title="class in org.apache.iceberg.types">TypeUtil.CustomOrderSchemaVisitor</a>&lt;T&gt;&nbsp;visitor)</code>
<div class="block">Used to traverse types with traversals other than pre-order.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;T</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/types/TypeUtil.html#visit-org.apache.iceberg.types.Type-org.apache.iceberg.types.TypeUtil.SchemaVisitor-">visit</a></span>(<a href="../../../../org/apache/iceberg/types/Type.html" title="interface in org.apache.iceberg.types">Type</a>&nbsp;type,
<a href="../../../../org/apache/iceberg/types/TypeUtil.SchemaVisitor.html" title="class in org.apache.iceberg.types">TypeUtil.SchemaVisitor</a>&lt;T&gt;&nbsp;visitor)</code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="select-org.apache.iceberg.Schema-java.util.Set-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>select</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;select(<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;schema,
java.util.Set&lt;java.lang.Integer&gt;&nbsp;fieldIds)</pre>
</li>
</ul>
<a name="select-org.apache.iceberg.types.Types.StructType-java.util.Set-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>select</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/iceberg/types/Types.StructType.html" title="class in org.apache.iceberg.types">Types.StructType</a>&nbsp;select(<a href="../../../../org/apache/iceberg/types/Types.StructType.html" title="class in org.apache.iceberg.types">Types.StructType</a>&nbsp;struct,
java.util.Set&lt;java.lang.Integer&gt;&nbsp;fieldIds)</pre>
</li>
</ul>
<a name="getProjectedIds-org.apache.iceberg.Schema-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getProjectedIds</h4>
<pre>public static&nbsp;java.util.Set&lt;java.lang.Integer&gt;&nbsp;getProjectedIds(<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;schema)</pre>
</li>
</ul>
<a name="getProjectedIds-org.apache.iceberg.types.Type-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getProjectedIds</h4>
<pre>public static&nbsp;java.util.Set&lt;java.lang.Integer&gt;&nbsp;getProjectedIds(<a href="../../../../org/apache/iceberg/types/Type.html" title="interface in org.apache.iceberg.types">Type</a>&nbsp;type)</pre>
</li>
</ul>
<a name="selectNot-org.apache.iceberg.types.Types.StructType-java.util.Set-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>selectNot</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/iceberg/types/Types.StructType.html" title="class in org.apache.iceberg.types">Types.StructType</a>&nbsp;selectNot(<a href="../../../../org/apache/iceberg/types/Types.StructType.html" title="class in org.apache.iceberg.types">Types.StructType</a>&nbsp;struct,
java.util.Set&lt;java.lang.Integer&gt;&nbsp;fieldIds)</pre>
</li>
</ul>
<a name="selectNot-org.apache.iceberg.Schema-java.util.Set-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>selectNot</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;selectNot(<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;schema,
java.util.Set&lt;java.lang.Integer&gt;&nbsp;fieldIds)</pre>
</li>
</ul>
<a name="join-org.apache.iceberg.Schema-org.apache.iceberg.Schema-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>join</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;join(<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;left,
<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;right)</pre>
</li>
</ul>
<a name="indexByName-org.apache.iceberg.types.Types.StructType-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>indexByName</h4>
<pre>public static&nbsp;java.util.Map&lt;java.lang.String,java.lang.Integer&gt;&nbsp;indexByName(<a href="../../../../org/apache/iceberg/types/Types.StructType.html" title="class in org.apache.iceberg.types">Types.StructType</a>&nbsp;struct)</pre>
</li>
</ul>
<a name="indexNameById-org.apache.iceberg.types.Types.StructType-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>indexNameById</h4>
<pre>public static&nbsp;java.util.Map&lt;java.lang.Integer,java.lang.String&gt;&nbsp;indexNameById(<a href="../../../../org/apache/iceberg/types/Types.StructType.html" title="class in org.apache.iceberg.types">Types.StructType</a>&nbsp;struct)</pre>
</li>
</ul>
<a name="indexByLowerCaseName-org.apache.iceberg.types.Types.StructType-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>indexByLowerCaseName</h4>
<pre>public static&nbsp;java.util.Map&lt;java.lang.String,java.lang.Integer&gt;&nbsp;indexByLowerCaseName(<a href="../../../../org/apache/iceberg/types/Types.StructType.html" title="class in org.apache.iceberg.types">Types.StructType</a>&nbsp;struct)</pre>
</li>
</ul>
<a name="indexById-org.apache.iceberg.types.Types.StructType-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>indexById</h4>
<pre>public static&nbsp;java.util.Map&lt;java.lang.Integer,<a href="../../../../org/apache/iceberg/types/Types.NestedField.html" title="class in org.apache.iceberg.types">Types.NestedField</a>&gt;&nbsp;indexById(<a href="../../../../org/apache/iceberg/types/Types.StructType.html" title="class in org.apache.iceberg.types">Types.StructType</a>&nbsp;struct)</pre>
</li>
</ul>
<a name="indexParents-org.apache.iceberg.types.Types.StructType-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>indexParents</h4>
<pre>public static&nbsp;java.util.Map&lt;java.lang.Integer,java.lang.Integer&gt;&nbsp;indexParents(<a href="../../../../org/apache/iceberg/types/Types.StructType.html" title="class in org.apache.iceberg.types">Types.StructType</a>&nbsp;struct)</pre>
</li>
</ul>
<a name="assignFreshIds-org.apache.iceberg.types.Type-org.apache.iceberg.types.TypeUtil.NextID-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>assignFreshIds</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/iceberg/types/Type.html" title="interface in org.apache.iceberg.types">Type</a>&nbsp;assignFreshIds(<a href="../../../../org/apache/iceberg/types/Type.html" title="interface in org.apache.iceberg.types">Type</a>&nbsp;type,
<a href="../../../../org/apache/iceberg/types/TypeUtil.NextID.html" title="interface in org.apache.iceberg.types">TypeUtil.NextID</a>&nbsp;nextId)</pre>
<div class="block">Assigns fresh ids from the <a href="../../../../org/apache/iceberg/types/TypeUtil.NextID.html" title="interface in org.apache.iceberg.types"><code>nextId function</code></a> for all fields in a type.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type</code> - a type</dd>
<dd><code>nextId</code> - an id assignment function</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an structurally identical type with new ids assigned by the nextId function</dd>
</dl>
</li>
</ul>
<a name="assignFreshIds-org.apache.iceberg.Schema-org.apache.iceberg.types.TypeUtil.NextID-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>assignFreshIds</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;assignFreshIds(<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;schema,
<a href="../../../../org/apache/iceberg/types/TypeUtil.NextID.html" title="interface in org.apache.iceberg.types">TypeUtil.NextID</a>&nbsp;nextId)</pre>
<div class="block">Assigns fresh ids from the <a href="../../../../org/apache/iceberg/types/TypeUtil.NextID.html" title="interface in org.apache.iceberg.types"><code>nextId function</code></a> for all fields in a schema.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>schema</code> - a schema</dd>
<dd><code>nextId</code> - an id assignment function</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a structurally identical schema with new ids assigned by the nextId function</dd>
</dl>
</li>
</ul>
<a name="assignFreshIds-org.apache.iceberg.Schema-org.apache.iceberg.Schema-org.apache.iceberg.types.TypeUtil.NextID-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>assignFreshIds</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;assignFreshIds(<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;schema,
<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;baseSchema,
<a href="../../../../org/apache/iceberg/types/TypeUtil.NextID.html" title="interface in org.apache.iceberg.types">TypeUtil.NextID</a>&nbsp;nextId)</pre>
<div class="block">Assigns ids to match a given schema, and fresh ids from the <a href="../../../../org/apache/iceberg/types/TypeUtil.NextID.html" title="interface in org.apache.iceberg.types"><code>nextId function</code></a> for all other fields.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>schema</code> - a schema</dd>
<dd><code>baseSchema</code> - a schema with existing IDs to copy by name</dd>
<dd><code>nextId</code> - an id assignment function</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a structurally identical schema with new ids assigned by the nextId function</dd>
</dl>
</li>
</ul>
<a name="assignIncreasingFreshIds-org.apache.iceberg.Schema-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>assignIncreasingFreshIds</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;assignIncreasingFreshIds(<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;schema)</pre>
<div class="block">Assigns strictly increasing fresh ids for all fields in a schema, starting from 1.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>schema</code> - a schema</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a structurally identical schema with new ids assigned strictly increasing from 1</dd>
</dl>
</li>
</ul>
<a name="reassignIds-org.apache.iceberg.Schema-org.apache.iceberg.Schema-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reassignIds</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;reassignIds(<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;schema,
<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;idSourceSchema)</pre>
<div class="block">Reassigns ids in a schema from another schema.
<p>
Ids are determined by field names. If a field in the schema cannot be found in the source
schema, this will throw IllegalArgumentException.
<p>
This will not alter a schema's structure, nullability, or types.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>schema</code> - the schema to have ids reassigned</dd>
<dd><code>idSourceSchema</code> - the schema from which field ids will be used</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an structurally identical schema with field ids matching the source schema</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if a field cannot be found (by name) in the source schema</dd>
</dl>
</li>
</ul>
<a name="find-org.apache.iceberg.Schema-java.util.function.Predicate-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>find</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/iceberg/types/Type.html" title="interface in org.apache.iceberg.types">Type</a>&nbsp;find(<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;schema,
java.util.function.Predicate&lt;<a href="../../../../org/apache/iceberg/types/Type.html" title="interface in org.apache.iceberg.types">Type</a>&gt;&nbsp;predicate)</pre>
</li>
</ul>
<a name="isPromotionAllowed-org.apache.iceberg.types.Type-org.apache.iceberg.types.Type.PrimitiveType-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isPromotionAllowed</h4>
<pre>public static&nbsp;boolean&nbsp;isPromotionAllowed(<a href="../../../../org/apache/iceberg/types/Type.html" title="interface in org.apache.iceberg.types">Type</a>&nbsp;from,
<a href="../../../../org/apache/iceberg/types/Type.PrimitiveType.html" title="class in org.apache.iceberg.types">Type.PrimitiveType</a>&nbsp;to)</pre>
</li>
</ul>
<a name="validateWriteSchema-org.apache.iceberg.Schema-org.apache.iceberg.Schema-java.lang.Boolean-java.lang.Boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>validateWriteSchema</h4>
<pre>public static&nbsp;void&nbsp;validateWriteSchema(<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;tableSchema,
<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;writeSchema,
java.lang.Boolean&nbsp;checkNullability,
java.lang.Boolean&nbsp;checkOrdering)</pre>
<div class="block">Check whether we could write the iceberg table with the user-provided write schema.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>tableSchema</code> - the table schema written in iceberg meta data.</dd>
<dd><code>writeSchema</code> - the user-provided write schema.</dd>
<dd><code>checkNullability</code> - If true, not allow to write optional values to a required field.</dd>
<dd><code>checkOrdering</code> - If true, not allow input schema to have different ordering than table schema.</dd>
</dl>
</li>
</ul>
<a name="visit-org.apache.iceberg.Schema-org.apache.iceberg.types.TypeUtil.SchemaVisitor-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>visit</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;T&nbsp;visit(<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;schema,
<a href="../../../../org/apache/iceberg/types/TypeUtil.SchemaVisitor.html" title="class in org.apache.iceberg.types">TypeUtil.SchemaVisitor</a>&lt;T&gt;&nbsp;visitor)</pre>
</li>
</ul>
<a name="visit-org.apache.iceberg.types.Type-org.apache.iceberg.types.TypeUtil.SchemaVisitor-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>visit</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;T&nbsp;visit(<a href="../../../../org/apache/iceberg/types/Type.html" title="interface in org.apache.iceberg.types">Type</a>&nbsp;type,
<a href="../../../../org/apache/iceberg/types/TypeUtil.SchemaVisitor.html" title="class in org.apache.iceberg.types">TypeUtil.SchemaVisitor</a>&lt;T&gt;&nbsp;visitor)</pre>
</li>
</ul>
<a name="visit-org.apache.iceberg.Schema-org.apache.iceberg.types.TypeUtil.CustomOrderSchemaVisitor-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>visit</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;T&nbsp;visit(<a href="../../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;schema,
<a href="../../../../org/apache/iceberg/types/TypeUtil.CustomOrderSchemaVisitor.html" title="class in org.apache.iceberg.types">TypeUtil.CustomOrderSchemaVisitor</a>&lt;T&gt;&nbsp;visitor)</pre>
</li>
</ul>
<a name="visit-org.apache.iceberg.types.Type-org.apache.iceberg.types.TypeUtil.CustomOrderSchemaVisitor-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>visit</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;T&nbsp;visit(<a href="../../../../org/apache/iceberg/types/Type.html" title="interface in org.apache.iceberg.types">Type</a>&nbsp;type,
<a href="../../../../org/apache/iceberg/types/TypeUtil.CustomOrderSchemaVisitor.html" title="class in org.apache.iceberg.types">TypeUtil.CustomOrderSchemaVisitor</a>&lt;T&gt;&nbsp;visitor)</pre>
<div class="block">Used to traverse types with traversals other than pre-order.
<p>
This passes a <code>Supplier</code> to each <a href="../../../../org/apache/iceberg/types/TypeUtil.CustomOrderSchemaVisitor.html" title="class in org.apache.iceberg.types"><code>visitor</code></a> method that
returns the result of traversing child types. Structs are passed an <code>Iterable</code> that
traverses child fields during iteration.
<p>
An example use is assigning column IDs, which should be done with a post-order traversal.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type returned by the visitor</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type</code> - a type to traverse with a visitor</dd>
<dd><code>visitor</code> - a custom order visitor</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the result of traversing the given type with the visitor</dd>
</dl>
</li>
</ul>
<a name="decimalRequiredBytes-int-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>decimalRequiredBytes</h4>
<pre>public static&nbsp;int&nbsp;decimalRequiredBytes(int&nbsp;precision)</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/iceberg/types/Types.UUIDType.html" title="class in org.apache.iceberg.types"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/iceberg/types/TypeUtil.CustomOrderSchemaVisitor.html" title="class in org.apache.iceberg.types"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/iceberg/types/TypeUtil.html" target="_top">Frames</a></li>
<li><a href="TypeUtil.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>