<!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 (version 1.7.0_51) on Wed Sep 16 10:26:32 PDT 2015 -->
<title>Row</title>
<meta name="date" content="2015-09-16">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Row";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><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/spark/sql/GroupedData.html" title="class in org.apache.spark.sql"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/spark/sql/RowFactory.html" title="class in org.apache.spark.sql"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/spark/sql/Row.html" target="_top">Frames</a></li>
<li><a href="Row.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All 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: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </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.spark.sql</div>
<h2 title="Interface Row" class="title">Interface Row</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd>java.io.Serializable</dd>
</dl>
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../../org/apache/spark/sql/expressions/MutableAggregationBuffer.html" title="class in org.apache.spark.sql.expressions">MutableAggregationBuffer</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="strong">Row</span>
extends scala.Serializable</pre>
<div class="block">Represents one row of output from a relational operator. Allows both generic access by ordinal,
which will incur boxing overhead for primitives, as well as native primitive access.
<p>
It is invalid to use the native primitive interface to retrieve a value that is null, instead a
user must check <code>isNullAt</code> before attempting to retrieve a value that might be null.
<p>
To create a new Row, use <code>RowFactory.create()</code> in Java or <code>Row.apply()</code> in Scala.
<p>
A <a href="../../../../org/apache/spark/sql/Row.html" title="interface in org.apache.spark.sql"><code>Row</code></a> object can be constructed by providing field values. Example:
<pre><code>
import org.apache.spark.sql._
// Create a Row from values.
Row(value1, value2, value3, ...)
// Create a Row from a Seq of values.
Row.fromSeq(Seq(value1, value2, ...))
</code></pre>
<p>
A value of a row can be accessed through both generic access by ordinal,
which will incur boxing overhead for primitives, as well as native primitive access.
An example of generic access by ordinal:
<pre><code>
import org.apache.spark.sql._
val row = Row(1, true, "a string", null)
// row: Row = [1,true,a string,null]
val firstValue = row(0)
// firstValue: Any = 1
val fourthValue = row(3)
// fourthValue: Any = null
</code></pre>
<p>
For native primitive access, it is invalid to use the native primitive interface to retrieve
a value that is null, instead a user must check <code>isNullAt</code> before attempting to retrieve a
value that might be null.
An example of native primitive access:
<pre><code>
// using the row from the previous example.
val firstValue = row.getInt(0)
// firstValue: Int = 1
val isNull = row.isNullAt(3)
// isNull: Boolean = true
</code></pre>
<p>
In Scala, fields in a <a href="../../../../org/apache/spark/sql/Row.html" title="interface in org.apache.spark.sql"><code>Row</code></a> object can be extracted in a pattern match. Example:
<pre><code>
import org.apache.spark.sql._
val pairs = sql("SELECT key, value FROM src").rdd.map {
case Row(key: Int, value: String) =>
key -> value
}
</code></pre>
<p></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#anyNull()">anyNull</a></strong>()</code>
<div class="block">Returns true if there are any NULL values in this row.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#apply(int)">apply</a></strong>(int i)</code>
<div class="block">Returns the value at position i.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/spark/sql/Row.html" title="interface in org.apache.spark.sql">Row</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#copy()">copy</a></strong>()</code>
<div class="block">Make a copy of the current <a href="../../../../org/apache/spark/sql/Row.html" title="interface in org.apache.spark.sql"><code>Row</code></a> object.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#equals(java.lang.Object)">equals</a></strong>(java.lang.Object o)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#fieldIndex(java.lang.String)">fieldIndex</a></strong>(java.lang.String name)</code>
<div class="block">Returns the index of a given field name.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#get(int)">get</a></strong>(int i)</code>
<div class="block">Returns the value at position i.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><T> T</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#getAs(int)">getAs</a></strong>(int i)</code>
<div class="block">Returns the value at position i.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><T> T</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#getAs(java.lang.String)">getAs</a></strong>(java.lang.String fieldName)</code>
<div class="block">Returns the value of a given fieldName.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#getBoolean(int)">getBoolean</a></strong>(int i)</code>
<div class="block">Returns the value at position i as a primitive boolean.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>byte</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#getByte(int)">getByte</a></strong>(int i)</code>
<div class="block">Returns the value at position i as a primitive byte.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.sql.Date</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#getDate(int)">getDate</a></strong>(int i)</code>
<div class="block">Returns the value at position i of date type as java.sql.Date.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.math.BigDecimal</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#getDecimal(int)">getDecimal</a></strong>(int i)</code>
<div class="block">Returns the value at position i of decimal type as java.math.BigDecimal.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#getDouble(int)">getDouble</a></strong>(int i)</code>
<div class="block">Returns the value at position i as a primitive double.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#getFloat(int)">getFloat</a></strong>(int i)</code>
<div class="block">Returns the value at position i as a primitive float.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#getInt(int)">getInt</a></strong>(int i)</code>
<div class="block">Returns the value at position i as a primitive int.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><K,V> java.util.Map<K,V></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#getJavaMap(int)">getJavaMap</a></strong>(int i)</code>
<div class="block">Returns the value at position i of array type as a <code>Map</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><T> java.util.List<T></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#getList(int)">getList</a></strong>(int i)</code>
<div class="block">Returns the value at position i of array type as <code>List</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#getLong(int)">getLong</a></strong>(int i)</code>
<div class="block">Returns the value at position i as a primitive long.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><K,V> scala.collection.Map<K,V></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#getMap(int)">getMap</a></strong>(int i)</code>
<div class="block">Returns the value at position i of map type as a Scala Map.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><T> scala.collection.Seq<T></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#getSeq(int)">getSeq</a></strong>(int i)</code>
<div class="block">Returns the value at position i of array type as a Scala Seq.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>short</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#getShort(int)">getShort</a></strong>(int i)</code>
<div class="block">Returns the value at position i as a primitive short.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#getString(int)">getString</a></strong>(int i)</code>
<div class="block">Returns the value at position i as a String object.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/spark/sql/Row.html" title="interface in org.apache.spark.sql">Row</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#getStruct(int)">getStruct</a></strong>(int i)</code>
<div class="block">Returns the value at position i of struct type as an <a href="../../../../org/apache/spark/sql/Row.html" title="interface in org.apache.spark.sql"><code>Row</code></a> object.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.sql.Timestamp</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#getTimestamp(int)">getTimestamp</a></strong>(int i)</code>
<div class="block">Returns the value at position i of date type as java.sql.Timestamp.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><T> scala.collection.immutable.Map<java.lang.String,T></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#getValuesMap(scala.collection.Seq)">getValuesMap</a></strong>(scala.collection.Seq<java.lang.String> fieldNames)</code>
<div class="block">Returns a Map(name -> value) for the requested fieldNames</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#hashCode()">hashCode</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#isNullAt(int)">isNullAt</a></strong>(int i)</code>
<div class="block">Checks whether the value at position i is null.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#length()">length</a></strong>()</code>
<div class="block">Number of elements in the Row.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#mkString()">mkString</a></strong>()</code>
<div class="block">Displays all elements of this sequence in a string (without a separator).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#mkString(java.lang.String)">mkString</a></strong>(java.lang.String sep)</code>
<div class="block">Displays all elements of this sequence in a string using a separator string.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#mkString(java.lang.String, java.lang.String, java.lang.String)">mkString</a></strong>(java.lang.String start,
java.lang.String sep,
java.lang.String end)</code>
<div class="block">Displays all elements of this traversable or iterator in a string using
start, end, and separator strings.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/spark/sql/types/StructType.html" title="class in org.apache.spark.sql.types">StructType</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#schema()">schema</a></strong>()</code>
<div class="block">Schema for the row.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#size()">size</a></strong>()</code>
<div class="block">Number of elements in the Row.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>scala.collection.Seq<java.lang.Object></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#toSeq()">toSeq</a></strong>()</code>
<div class="block">Return a Scala Seq representing the row.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/sql/Row.html#toString()">toString</a></strong>()</code> </td>
</tr>
</table>
</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="size()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>size</h4>
<pre>int size()</pre>
<div class="block">Number of elements in the Row.</div>
</li>
</ul>
<a name="length()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>length</h4>
<pre>int length()</pre>
<div class="block">Number of elements in the Row.</div>
</li>
</ul>
<a name="schema()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>schema</h4>
<pre><a href="../../../../org/apache/spark/sql/types/StructType.html" title="class in org.apache.spark.sql.types">StructType</a> schema()</pre>
<div class="block">Schema for the row.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="apply(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>apply</h4>
<pre>java.lang.Object apply(int i)</pre>
<div class="block">Returns the value at position i. If the value is null, null is returned. The following
is a mapping between Spark SQL types and return types:
<p>
<pre><code>
BooleanType -> java.lang.Boolean
ByteType -> java.lang.Byte
ShortType -> java.lang.Short
IntegerType -> java.lang.Integer
FloatType -> java.lang.Float
DoubleType -> java.lang.Double
StringType -> String
DecimalType -> java.math.BigDecimal
DateType -> java.sql.Date
TimestampType -> java.sql.Timestamp
BinaryType -> byte array
ArrayType -> scala.collection.Seq (use getList for java.util.List)
MapType -> scala.collection.Map (use getJavaMap for java.util.Map)
StructType -> org.apache.spark.sql.Row
</code></pre></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="get(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>get</h4>
<pre>java.lang.Object get(int i)</pre>
<div class="block">Returns the value at position i. If the value is null, null is returned. The following
is a mapping between Spark SQL types and return types:
<p>
<pre><code>
BooleanType -> java.lang.Boolean
ByteType -> java.lang.Byte
ShortType -> java.lang.Short
IntegerType -> java.lang.Integer
FloatType -> java.lang.Float
DoubleType -> java.lang.Double
StringType -> String
DecimalType -> java.math.BigDecimal
DateType -> java.sql.Date
TimestampType -> java.sql.Timestamp
BinaryType -> byte array
ArrayType -> scala.collection.Seq (use getList for java.util.List)
MapType -> scala.collection.Map (use getJavaMap for java.util.Map)
StructType -> org.apache.spark.sql.Row
</code></pre></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="isNullAt(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isNullAt</h4>
<pre>boolean isNullAt(int i)</pre>
<div class="block">Checks whether the value at position i is null.</div>
</li>
</ul>
<a name="getBoolean(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBoolean</h4>
<pre>boolean getBoolean(int i)</pre>
<div class="block">Returns the value at position i as a primitive boolean.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.ClassCastException</code> - when data type does not match.</dd>
<dd><code>java.lang.NullPointerException</code> - when value is null.</dd></dl>
</li>
</ul>
<a name="getByte(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getByte</h4>
<pre>byte getByte(int i)</pre>
<div class="block">Returns the value at position i as a primitive byte.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.ClassCastException</code> - when data type does not match.</dd>
<dd><code>java.lang.NullPointerException</code> - when value is null.</dd></dl>
</li>
</ul>
<a name="getShort(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getShort</h4>
<pre>short getShort(int i)</pre>
<div class="block">Returns the value at position i as a primitive short.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.ClassCastException</code> - when data type does not match.</dd>
<dd><code>java.lang.NullPointerException</code> - when value is null.</dd></dl>
</li>
</ul>
<a name="getInt(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInt</h4>
<pre>int getInt(int i)</pre>
<div class="block">Returns the value at position i as a primitive int.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.ClassCastException</code> - when data type does not match.</dd>
<dd><code>java.lang.NullPointerException</code> - when value is null.</dd></dl>
</li>
</ul>
<a name="getLong(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLong</h4>
<pre>long getLong(int i)</pre>
<div class="block">Returns the value at position i as a primitive long.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.ClassCastException</code> - when data type does not match.</dd>
<dd><code>java.lang.NullPointerException</code> - when value is null.</dd></dl>
</li>
</ul>
<a name="getFloat(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFloat</h4>
<pre>float getFloat(int i)</pre>
<div class="block">Returns the value at position i as a primitive float.
Throws an exception if the type mismatches or if the value is null.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.ClassCastException</code> - when data type does not match.</dd>
<dd><code>java.lang.NullPointerException</code> - when value is null.</dd></dl>
</li>
</ul>
<a name="getDouble(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDouble</h4>
<pre>double getDouble(int i)</pre>
<div class="block">Returns the value at position i as a primitive double.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.ClassCastException</code> - when data type does not match.</dd>
<dd><code>java.lang.NullPointerException</code> - when value is null.</dd></dl>
</li>
</ul>
<a name="getString(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getString</h4>
<pre>java.lang.String getString(int i)</pre>
<div class="block">Returns the value at position i as a String object.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.ClassCastException</code> - when data type does not match.</dd>
<dd><code>java.lang.NullPointerException</code> - when value is null.</dd></dl>
</li>
</ul>
<a name="getDecimal(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDecimal</h4>
<pre>java.math.BigDecimal getDecimal(int i)</pre>
<div class="block">Returns the value at position i of decimal type as java.math.BigDecimal.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.ClassCastException</code> - when data type does not match.</dd></dl>
</li>
</ul>
<a name="getDate(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDate</h4>
<pre>java.sql.Date getDate(int i)</pre>
<div class="block">Returns the value at position i of date type as java.sql.Date.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.ClassCastException</code> - when data type does not match.</dd></dl>
</li>
</ul>
<a name="getTimestamp(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTimestamp</h4>
<pre>java.sql.Timestamp getTimestamp(int i)</pre>
<div class="block">Returns the value at position i of date type as java.sql.Timestamp.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.ClassCastException</code> - when data type does not match.</dd></dl>
</li>
</ul>
<a name="getSeq(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSeq</h4>
<pre><T> scala.collection.Seq<T> getSeq(int i)</pre>
<div class="block">Returns the value at position i of array type as a Scala Seq.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.ClassCastException</code> - when data type does not match.</dd></dl>
</li>
</ul>
<a name="getList(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getList</h4>
<pre><T> java.util.List<T> getList(int i)</pre>
<div class="block">Returns the value at position i of array type as <code>List</code>.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.ClassCastException</code> - when data type does not match.</dd></dl>
</li>
</ul>
<a name="getMap(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMap</h4>
<pre><K,V> scala.collection.Map<K,V> getMap(int i)</pre>
<div class="block">Returns the value at position i of map type as a Scala Map.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.ClassCastException</code> - when data type does not match.</dd></dl>
</li>
</ul>
<a name="getJavaMap(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getJavaMap</h4>
<pre><K,V> java.util.Map<K,V> getJavaMap(int i)</pre>
<div class="block">Returns the value at position i of array type as a <code>Map</code>.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.ClassCastException</code> - when data type does not match.</dd></dl>
</li>
</ul>
<a name="getStruct(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStruct</h4>
<pre><a href="../../../../org/apache/spark/sql/Row.html" title="interface in org.apache.spark.sql">Row</a> getStruct(int i)</pre>
<div class="block">Returns the value at position i of struct type as an <a href="../../../../org/apache/spark/sql/Row.html" title="interface in org.apache.spark.sql"><code>Row</code></a> object.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.ClassCastException</code> - when data type does not match.</dd></dl>
</li>
</ul>
<a name="getAs(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAs</h4>
<pre><T> T getAs(int i)</pre>
<div class="block">Returns the value at position i.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.ClassCastException</code> - when data type does not match.</dd></dl>
</li>
</ul>
<a name="getAs(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAs</h4>
<pre><T> T getAs(java.lang.String fieldName)</pre>
<div class="block">Returns the value of a given fieldName.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>fieldName</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.UnsupportedOperationException</code> - when schema is not defined.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - when fieldName do not exist.</dd>
<dd><code>java.lang.ClassCastException</code> - when data type does not match.</dd></dl>
</li>
</ul>
<a name="fieldIndex(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fieldIndex</h4>
<pre>int fieldIndex(java.lang.String name)</pre>
<div class="block">Returns the index of a given field name.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.UnsupportedOperationException</code> - when schema is not defined.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - when fieldName do not exist.</dd></dl>
</li>
</ul>
<a name="getValuesMap(scala.collection.Seq)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getValuesMap</h4>
<pre><T> scala.collection.immutable.Map<java.lang.String,T> getValuesMap(scala.collection.Seq<java.lang.String> fieldNames)</pre>
<div class="block">Returns a Map(name -> value) for the requested fieldNames
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>fieldNames</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.UnsupportedOperationException</code> - when schema is not defined.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - when fieldName do not exist.</dd>
<dd><code>java.lang.ClassCastException</code> - when data type does not match.</dd></dl>
</li>
</ul>
<a name="toString()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>java.lang.String toString()</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>toString</code> in class <code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="copy()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre><a href="../../../../org/apache/spark/sql/Row.html" title="interface in org.apache.spark.sql">Row</a> copy()</pre>
<div class="block">Make a copy of the current <a href="../../../../org/apache/spark/sql/Row.html" title="interface in org.apache.spark.sql"><code>Row</code></a> object.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="anyNull()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>anyNull</h4>
<pre>boolean anyNull()</pre>
<div class="block">Returns true if there are any NULL values in this row.</div>
</li>
</ul>
<a name="equals(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>boolean equals(java.lang.Object o)</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>equals</code> in class <code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="hashCode()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>int hashCode()</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>hashCode</code> in class <code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="toSeq()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toSeq</h4>
<pre>scala.collection.Seq<java.lang.Object> toSeq()</pre>
<div class="block">Return a Scala Seq representing the row. Elements are placed in the same order in the Seq.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="mkString()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>mkString</h4>
<pre>java.lang.String mkString()</pre>
<div class="block">Displays all elements of this sequence in a string (without a separator).</div>
</li>
</ul>
<a name="mkString(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>mkString</h4>
<pre>java.lang.String mkString(java.lang.String sep)</pre>
<div class="block">Displays all elements of this sequence in a string using a separator string.</div>
</li>
</ul>
<a name="mkString(java.lang.String, java.lang.String, java.lang.String)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>mkString</h4>
<pre>java.lang.String mkString(java.lang.String start,
java.lang.String sep,
java.lang.String end)</pre>
<div class="block">Displays all elements of this traversable or iterator in a string using
start, end, and separator strings.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>start</code> - (undocumented)</dd><dd><code>sep</code> - (undocumented)</dd><dd><code>end</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</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><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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/spark/sql/GroupedData.html" title="class in org.apache.spark.sql"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/spark/sql/RowFactory.html" title="class in org.apache.spark.sql"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/spark/sql/Row.html" target="_top">Frames</a></li>
<li><a href="Row.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All 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: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<script defer="defer" type="text/javascript" src="../../../../lib/jquery.js"></script><script defer="defer" type="text/javascript" src="../../../../lib/api-javadocs.js"></script></body>
</html>