blob: 746ec669e9709eef55d559acce6d696ca3a8e277 [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_201) on Fri Oct 25 17:25:33 PDT 2019 -->
<title>PartitionSpec (iceberg 0.7.0-incubating API)</title>
<meta name="date" content="2019-10-25">
<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="PartitionSpec (iceberg 0.7.0-incubating API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":9,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance 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/PartitionField.html" title="class in org.apache.iceberg"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../org/apache/iceberg/PartitionSpec.Builder.html" title="class in org.apache.iceberg"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/apache/iceberg/PartitionSpec.html" target="_top">Frames</a></li>
<li><a href="PartitionSpec.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</div>
<h2 title="Class PartitionSpec" class="title">Class PartitionSpec</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.iceberg.PartitionSpec</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.io.Serializable</dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">PartitionSpec</span>
extends java.lang.Object
implements java.io.Serializable</pre>
<div class="block">Represents how to produce partition data for a table.
<p>
Partition data is produced by transforming columns in a table. Each column transform is
represented by a named <a href="../../../org/apache/iceberg/PartitionField.html" title="class in org.apache.iceberg"><code>PartitionField</code></a>.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../serialized-form.html#org.apache.iceberg.PartitionSpec">Serialized Form</a></dd>
</dl>
</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/PartitionSpec.Builder.html" title="class in org.apache.iceberg">PartitionSpec.Builder</a></span></code>
<div class="block">Used to create valid <a href="../../../org/apache/iceberg/PartitionSpec.html" title="class in org.apache.iceberg"><code>partition specs</code></a>.</div>
</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="t2" class="tableTab"><span><a href="javascript:show(2);">Instance 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/PartitionSpec.Builder.html" title="class in org.apache.iceberg">PartitionSpec.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/iceberg/PartitionSpec.html#builderFor-org.apache.iceberg.Schema-">builderFor</a></span>(<a href="../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;schema)</code>
<div class="block">Creates a new <a href="../../../org/apache/iceberg/PartitionSpec.Builder.html" title="class in org.apache.iceberg"><code>partition spec builder</code></a> for the given <a href="../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg"><code>Schema</code></a>.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/iceberg/PartitionSpec.html#compatibleWith-org.apache.iceberg.PartitionSpec-">compatibleWith</a></span>(<a href="../../../org/apache/iceberg/PartitionSpec.html" title="class in org.apache.iceberg">PartitionSpec</a>&nbsp;other)</code>
<div class="block">Returns true if this spec is equivalent to the other, with field names ignored.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/iceberg/PartitionSpec.html#equals-java.lang.Object-">equals</a></span>(java.lang.Object&nbsp;other)</code>&nbsp;</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>java.util.List&lt;<a href="../../../org/apache/iceberg/PartitionField.html" title="class in org.apache.iceberg">PartitionField</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/iceberg/PartitionSpec.html#fields--">fields</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>java.util.List&lt;<a href="../../../org/apache/iceberg/PartitionField.html" title="class in org.apache.iceberg">PartitionField</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/iceberg/PartitionSpec.html#getFieldsBySourceId-int-">getFieldsBySourceId</a></span>(int&nbsp;fieldId)</code>&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/iceberg/PartitionSpec.html#hashCode--">hashCode</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>java.util.Set&lt;java.lang.Integer&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/iceberg/PartitionSpec.html#identitySourceIds--">identitySourceIds</a></span>()</code>
<div class="block">Returns the source field ids for identity partitions.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>java.lang.Class&lt;?&gt;[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/iceberg/PartitionSpec.html#javaClasses--">javaClasses</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/iceberg/PartitionSpec.html#partitionToPath-org.apache.iceberg.StructLike-">partitionToPath</a></span>(<a href="../../../org/apache/iceberg/StructLike.html" title="interface in org.apache.iceberg">StructLike</a>&nbsp;data)</code>&nbsp;</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><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/PartitionSpec.html#partitionType--">partitionType</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><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/PartitionSpec.html#schema--">schema</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/iceberg/PartitionSpec.html#specId--">specId</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/iceberg/PartitionSpec.html#toString--">toString</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>static <a href="../../../org/apache/iceberg/PartitionSpec.html" title="class in org.apache.iceberg">PartitionSpec</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/iceberg/PartitionSpec.html#unpartitioned--">unpartitioned</a></span>()</code>
<div class="block">Returns a spec for unpartitioned tables.</div>
</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, finalize, getClass, notify, notifyAll, 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="schema--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>schema</h4>
<pre>public&nbsp;<a href="../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;schema()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <a href="../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg"><code>Schema</code></a> for this spec.</dd>
</dl>
</li>
</ul>
<a name="specId--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>specId</h4>
<pre>public&nbsp;int&nbsp;specId()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the ID of this spec</dd>
</dl>
</li>
</ul>
<a name="fields--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fields</h4>
<pre>public&nbsp;java.util.List&lt;<a href="../../../org/apache/iceberg/PartitionField.html" title="class in org.apache.iceberg">PartitionField</a>&gt;&nbsp;fields()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the list of <a href="../../../org/apache/iceberg/PartitionField.html" title="class in org.apache.iceberg"><code>partition fields</code></a> for this spec.</dd>
</dl>
</li>
</ul>
<a name="getFieldsBySourceId-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFieldsBySourceId</h4>
<pre>public&nbsp;java.util.List&lt;<a href="../../../org/apache/iceberg/PartitionField.html" title="class in org.apache.iceberg">PartitionField</a>&gt;&nbsp;getFieldsBySourceId(int&nbsp;fieldId)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fieldId</code> - a field id from the source schema</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <a href="../../../org/apache/iceberg/PartitionField.html" title="class in org.apache.iceberg"><code>field</code></a> that partitions the given source field</dd>
</dl>
</li>
</ul>
<a name="partitionType--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>partitionType</h4>
<pre>public&nbsp;<a href="../../../org/apache/iceberg/types/Types.StructType.html" title="class in org.apache.iceberg.types">Types.StructType</a>&nbsp;partitionType()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <code>Types.StructType</code> for partition data defined by this spec.</dd>
</dl>
</li>
</ul>
<a name="javaClasses--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>javaClasses</h4>
<pre>public&nbsp;java.lang.Class&lt;?&gt;[]&nbsp;javaClasses()</pre>
</li>
</ul>
<a name="partitionToPath-org.apache.iceberg.StructLike-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>partitionToPath</h4>
<pre>public&nbsp;java.lang.String&nbsp;partitionToPath(<a href="../../../org/apache/iceberg/StructLike.html" title="interface in org.apache.iceberg">StructLike</a>&nbsp;data)</pre>
</li>
</ul>
<a name="compatibleWith-org.apache.iceberg.PartitionSpec-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>compatibleWith</h4>
<pre>public&nbsp;boolean&nbsp;compatibleWith(<a href="../../../org/apache/iceberg/PartitionSpec.html" title="class in org.apache.iceberg">PartitionSpec</a>&nbsp;other)</pre>
<div class="block">Returns true if this spec is equivalent to the other, with field names ignored. That is, if
both specs have the same number of fields, field order, source columns, and transforms.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>other</code> - another PartitionSpec</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the specs have the same fields, source columns, and transforms.</dd>
</dl>
</li>
</ul>
<a name="equals-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public&nbsp;boolean&nbsp;equals(java.lang.Object&nbsp;other)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>equals</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="hashCode--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>public&nbsp;int&nbsp;hashCode()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>hashCode</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="identitySourceIds--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>identitySourceIds</h4>
<pre>public&nbsp;java.util.Set&lt;java.lang.Integer&gt;&nbsp;identitySourceIds()</pre>
<div class="block">Returns the source field ids for identity partitions.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a set of source ids for the identity partitions.</dd>
</dl>
</li>
</ul>
<a name="toString--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public&nbsp;java.lang.String&nbsp;toString()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="unpartitioned--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unpartitioned</h4>
<pre>public static&nbsp;<a href="../../../org/apache/iceberg/PartitionSpec.html" title="class in org.apache.iceberg">PartitionSpec</a>&nbsp;unpartitioned()</pre>
<div class="block">Returns a spec for unpartitioned tables.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a partition spec with no partitions</dd>
</dl>
</li>
</ul>
<a name="builderFor-org.apache.iceberg.Schema-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>builderFor</h4>
<pre>public static&nbsp;<a href="../../../org/apache/iceberg/PartitionSpec.Builder.html" title="class in org.apache.iceberg">PartitionSpec.Builder</a>&nbsp;builderFor(<a href="../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg">Schema</a>&nbsp;schema)</pre>
<div class="block">Creates a new <a href="../../../org/apache/iceberg/PartitionSpec.Builder.html" title="class in org.apache.iceberg"><code>partition spec builder</code></a> for the given <a href="../../../org/apache/iceberg/Schema.html" title="class in org.apache.iceberg"><code>Schema</code></a>.</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 partition spec builder for the given schema</dd>
</dl>
</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/PartitionField.html" title="class in org.apache.iceberg"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../org/apache/iceberg/PartitionSpec.Builder.html" title="class in org.apache.iceberg"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/apache/iceberg/PartitionSpec.html" target="_top">Frames</a></li>
<li><a href="PartitionSpec.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>