blob: d4951c17b5836e146cb6727fb7f3ce9aae4cfc0f [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>PigAggregate (Apache Calcite API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-migrate-3.0.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="PigAggregate (Apache Calcite API)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"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":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/PigAggregate.html">Use</a></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" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.calcite.adapter.pig</a></div>
<h2 title="Class PigAggregate" class="title">Class PigAggregate</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li><a href="../../rel/AbstractRelNode.html" title="class in org.apache.calcite.rel">org.apache.calcite.rel.AbstractRelNode</a></li>
<li>
<ul class="inheritance">
<li><a href="../../rel/SingleRel.html" title="class in org.apache.calcite.rel">org.apache.calcite.rel.SingleRel</a></li>
<li>
<ul class="inheritance">
<li><a href="../../rel/core/Aggregate.html" title="class in org.apache.calcite.rel.core">org.apache.calcite.rel.core.Aggregate</a></li>
<li>
<ul class="inheritance">
<li>org.apache.calcite.adapter.pig.PigAggregate</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code>java.lang.Cloneable</code>, <code><a href="PigRel.html" title="interface in org.apache.calcite.adapter.pig">PigRel</a></code>, <code><a href="../../plan/RelOptNode.html" title="interface in org.apache.calcite.plan">RelOptNode</a></code>, <code><a href="../../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a></code></dd>
</dl>
<hr>
<pre>public class <span class="typeNameLabel">PigAggregate</span>
extends <a href="../../rel/core/Aggregate.html" title="class in org.apache.calcite.rel.core">Aggregate</a>
implements <a href="PigRel.html" title="interface in org.apache.calcite.adapter.pig">PigRel</a></pre>
<div class="block">Implementation of <a href="../../rel/core/Aggregate.html" title="class in org.apache.calcite.rel.core"><code>Aggregate</code></a> in
<a href="PigRel.html#CONVENTION"><code>Pig calling convention</code></a>.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<ul class="blockList">
<li class="blockList"><a id="nested.classes.inherited.from.class.org.apache.calcite.rel.core.Aggregate">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from class&nbsp;org.apache.calcite.rel.core.<a href="../../rel/core/Aggregate.html" title="class in org.apache.calcite.rel.core">Aggregate</a></h3>
<code><a href="../../rel/core/Aggregate.AggCallBinding.html" title="class in org.apache.calcite.rel.core">Aggregate.AggCallBinding</a>, <a href="../../rel/core/Aggregate.Group.html" title="enum in org.apache.calcite.rel.core">Aggregate.Group</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="nested.classes.inherited.from.class.org.apache.calcite.adapter.pig.PigRel">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from interface&nbsp;org.apache.calcite.adapter.pig.<a href="PigRel.html" title="interface in org.apache.calcite.adapter.pig">PigRel</a></h3>
<code><a href="PigRel.Implementor.html" title="class in org.apache.calcite.adapter.pig">PigRel.Implementor</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="nested.classes.inherited.from.class.org.apache.calcite.rel.RelNode">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from interface&nbsp;org.apache.calcite.rel.<a href="../../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a></h3>
<code><a href="../../rel/RelNode.Context.html" title="interface in org.apache.calcite.rel">RelNode.Context</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DISTINCT_FIELD_SUFFIX">DISTINCT_FIELD_SUFFIX</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.org.apache.calcite.rel.core.Aggregate">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.apache.calcite.rel.core.<a href="../../rel/core/Aggregate.html" title="class in org.apache.calcite.rel.core">Aggregate</a></h3>
<code><a href="../../rel/core/Aggregate.html#aggCalls">aggCalls</a>, <a href="../../rel/core/Aggregate.html#groupSet">groupSet</a>, <a href="../../rel/core/Aggregate.html#groupSets">groupSets</a>, <a href="../../rel/core/Aggregate.html#indicator">indicator</a>, <a href="../../rel/core/Aggregate.html#IS_NOT_GRAND_TOTAL">IS_NOT_GRAND_TOTAL</a>, <a href="../../rel/core/Aggregate.html#IS_SIMPLE">IS_SIMPLE</a>, <a href="../../rel/core/Aggregate.html#NO_INDICATOR">NO_INDICATOR</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.org.apache.calcite.rel.SingleRel">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.apache.calcite.rel.<a href="../../rel/SingleRel.html" title="class in org.apache.calcite.rel">SingleRel</a></h3>
<code><a href="../../rel/SingleRel.html#input">input</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.org.apache.calcite.rel.AbstractRelNode">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.apache.calcite.rel.<a href="../../rel/AbstractRelNode.html" title="class in org.apache.calcite.rel">AbstractRelNode</a></h3>
<code><a href="../../rel/AbstractRelNode.html#digest">digest</a>, <a href="../../rel/AbstractRelNode.html#id">id</a>, <a href="../../rel/AbstractRelNode.html#rowType">rowType</a>, <a href="../../rel/AbstractRelNode.html#traitSet">traitSet</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.org.apache.calcite.adapter.pig.PigRel">
<!-- -->
</a>
<h3>Fields inherited from interface&nbsp;org.apache.calcite.adapter.pig.<a href="PigRel.html" title="interface in org.apache.calcite.adapter.pig">PigRel</a></h3>
<code><a href="PigRel.html#CONVENTION">CONVENTION</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.calcite.plan.RelOptCluster,org.apache.calcite.plan.RelTraitSet,org.apache.calcite.rel.RelNode,boolean,org.apache.calcite.util.ImmutableBitSet,java.util.List,java.util.List)">PigAggregate</a></span>&#8203;(<a href="../../plan/RelOptCluster.html" title="class in org.apache.calcite.plan">RelOptCluster</a>&nbsp;cluster,
<a href="../../plan/RelTraitSet.html" title="class in org.apache.calcite.plan">RelTraitSet</a>&nbsp;traitSet,
<a href="../../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;input,
boolean&nbsp;indicator,
<a href="../../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;groupSet,
java.util.List&lt;<a href="../../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&gt;&nbsp;groupSets,
java.util.List&lt;<a href="../../rel/core/AggregateCall.html" title="class in org.apache.calcite.rel.core">AggregateCall</a>&gt;&nbsp;aggCalls)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span></div>
</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.calcite.plan.RelOptCluster,org.apache.calcite.plan.RelTraitSet,org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.List,java.util.List)">PigAggregate</a></span>&#8203;(<a href="../../plan/RelOptCluster.html" title="class in org.apache.calcite.plan">RelOptCluster</a>&nbsp;cluster,
<a href="../../plan/RelTraitSet.html" title="class in org.apache.calcite.plan">RelTraitSet</a>&nbsp;traitSet,
<a href="../../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;input,
<a href="../../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;groupSet,
java.util.List&lt;<a href="../../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&gt;&nbsp;groupSets,
java.util.List&lt;<a href="../../rel/core/AggregateCall.html" title="class in org.apache.calcite.rel.core">AggregateCall</a>&gt;&nbsp;aggCalls)</code></th>
<td class="colLast">
<div class="block">Creates a PigAggregate.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</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="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="../../rel/core/Aggregate.html" title="class in org.apache.calcite.rel.core">Aggregate</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#copy(org.apache.calcite.plan.RelTraitSet,org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.List,java.util.List)">copy</a></span>&#8203;(<a href="../../plan/RelTraitSet.html" title="class in org.apache.calcite.plan">RelTraitSet</a>&nbsp;traitSet,
<a href="../../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;input,
<a href="../../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;groupSet,
java.util.List&lt;<a href="../../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&gt;&nbsp;groupSets,
java.util.List&lt;<a href="../../rel/core/AggregateCall.html" title="class in org.apache.calcite.rel.core">AggregateCall</a>&gt;&nbsp;aggCalls)</code></th>
<td class="colLast">
<div class="block">Creates a copy of this aggregate.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>private java.util.List&lt;java.lang.String&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getArgNames(java.lang.String,org.apache.calcite.rel.core.AggregateCall)">getArgNames</a></span>&#8203;(java.lang.String&nbsp;relAlias,
<a href="../../rel/core/AggregateCall.html" title="class in org.apache.calcite.rel.core">AggregateCall</a>&nbsp;aggCall)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>private java.util.List&lt;java.lang.String&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDistinctCalls(org.apache.calcite.adapter.pig.PigRel.Implementor)">getDistinctCalls</a></span>&#8203;(<a href="PigRel.Implementor.html" title="class in org.apache.calcite.adapter.pig">PigRel.Implementor</a>&nbsp;implementor)</code></th>
<td class="colLast">
<div class="block">A agg function call like <code>COUNT(DISTINCT COL)</code> in Pig is
achieved via two statements in a FOREACH that follows a GROUP statement:
<code>
TABLE = GROUP TABLE ALL;<br>
TABLE = FOREACH TABLE {<br>
&nbsp;&nbsp;<b>COL.DISTINCT = DISTINCT COL;<br>
&nbsp;&nbsp;GENERATE COUNT(COL.DISTINCT) AS C;</b><br>
}</code>
</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>private java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getInputFieldName(int)">getInputFieldName</a></span>&#8203;(int&nbsp;fieldIndex)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>private java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getInputFieldNameForAggCall(java.lang.String,org.apache.calcite.rel.core.AggregateCall,int)">getInputFieldNameForAggCall</a></span>&#8203;(java.lang.String&nbsp;relAlias,
<a href="../../rel/core/AggregateCall.html" title="class in org.apache.calcite.rel.core">AggregateCall</a>&nbsp;aggCall,
int&nbsp;fieldIndex)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>private java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPigAggregateCall(java.lang.String,org.apache.calcite.rel.core.AggregateCall)">getPigAggregateCall</a></span>&#8203;(java.lang.String&nbsp;relAlias,
<a href="../../rel/core/AggregateCall.html" title="class in org.apache.calcite.rel.core">AggregateCall</a>&nbsp;aggCall)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>private java.util.List&lt;java.lang.String&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPigAggregateCalls(org.apache.calcite.adapter.pig.PigRel.Implementor)">getPigAggregateCalls</a></span>&#8203;(<a href="PigRel.Implementor.html" title="class in org.apache.calcite.adapter.pig">PigRel.Implementor</a>&nbsp;implementor)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>private java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPigAggregateStatement(org.apache.calcite.adapter.pig.PigRel.Implementor)">getPigAggregateStatement</a></span>&#8203;(<a href="PigRel.Implementor.html" title="class in org.apache.calcite.adapter.pig">PigRel.Implementor</a>&nbsp;implementor)</code></th>
<td class="colLast">
<div class="block">Generates a GROUP BY statement, followed by an optional FOREACH statement
for all aggregate functions used.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>private java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPigForEachGenerate(org.apache.calcite.adapter.pig.PigRel.Implementor)">getPigForEachGenerate</a></span>&#8203;(<a href="PigRel.Implementor.html" title="class in org.apache.calcite.adapter.pig">PigRel.Implementor</a>&nbsp;implementor)</code></th>
<td class="colLast">
<div class="block">Generates a FOREACH statement containing invocation of aggregate functions
and projection of grouped fields.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>private java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPigGenerateCall(org.apache.calcite.adapter.pig.PigRel.Implementor)">getPigGenerateCall</a></span>&#8203;(<a href="PigRel.Implementor.html" title="class in org.apache.calcite.adapter.pig">PigRel.Implementor</a>&nbsp;implementor)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>private java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPigGroupBy(org.apache.calcite.adapter.pig.PigRel.Implementor)">getPigGroupBy</a></span>&#8203;(<a href="PigRel.Implementor.html" title="class in org.apache.calcite.adapter.pig">PigRel.Implementor</a>&nbsp;implementor)</code></th>
<td class="colLast">
<div class="block">Generates the GROUP BY statement, e.g.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="../../plan/RelOptTable.html" title="interface in org.apache.calcite.plan">RelOptTable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTable()">getTable</a></span>()</code></th>
<td class="colLast">
<div class="block">Override this method so it looks down the tree to find the table this node
is acting on.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#implement(org.apache.calcite.adapter.pig.PigRel.Implementor)">implement</a></span>&#8203;(<a href="PigRel.Implementor.html" title="class in org.apache.calcite.adapter.pig">PigRel.Implementor</a>&nbsp;implementor)</code></th>
<td class="colLast">
<div class="block">Converts this node to a Pig Latin statement.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>private <a href="PigAggFunction.html" title="enum in org.apache.calcite.adapter.pig">PigAggFunction</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toPigAggFunc(org.apache.calcite.rel.core.AggregateCall)">toPigAggFunc</a></span>&#8203;(<a href="../../rel/core/AggregateCall.html" title="class in org.apache.calcite.rel.core">AggregateCall</a>&nbsp;aggCall)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.apache.calcite.rel.core.Aggregate">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.calcite.rel.core.<a href="../../rel/core/Aggregate.html" title="class in org.apache.calcite.rel.core">Aggregate</a></h3>
<code><a href="../../rel/core/Aggregate.html#checkIndicator(boolean)">checkIndicator</a>, <a href="../../rel/core/Aggregate.html#computeSelfCost(org.apache.calcite.plan.RelOptPlanner,org.apache.calcite.rel.metadata.RelMetadataQuery)">computeSelfCost</a>, <a href="../../rel/core/Aggregate.html#containsDistinctCall()">containsDistinctCall</a>, <a href="../../rel/core/Aggregate.html#copy(org.apache.calcite.plan.RelTraitSet,java.util.List)">copy</a>, <a href="../../rel/core/Aggregate.html#copy(org.apache.calcite.plan.RelTraitSet,org.apache.calcite.rel.RelNode,boolean,org.apache.calcite.util.ImmutableBitSet,java.util.List,java.util.List)">copy</a>, <a href="../../rel/core/Aggregate.html#deriveRowType()">deriveRowType</a>, <a href="../../rel/core/Aggregate.html#deriveRowType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,boolean,org.apache.calcite.util.ImmutableBitSet,java.util.List,java.util.List)">deriveRowType</a>, <a href="../../rel/core/Aggregate.html#estimateRowCount(org.apache.calcite.rel.metadata.RelMetadataQuery)">estimateRowCount</a>, <a href="../../rel/core/Aggregate.html#explainTerms(org.apache.calcite.rel.RelWriter)">explainTerms</a>, <a href="../../rel/core/Aggregate.html#getAggCallList()">getAggCallList</a>, <a href="../../rel/core/Aggregate.html#getGroupCount()">getGroupCount</a>, <a href="../../rel/core/Aggregate.html#getGroupSet()">getGroupSet</a>, <a href="../../rel/core/Aggregate.html#getGroupSets()">getGroupSets</a>, <a href="../../rel/core/Aggregate.html#getGroupType()">getGroupType</a>, <a href="../../rel/core/Aggregate.html#getIndicatorCount()">getIndicatorCount</a>, <a href="../../rel/core/Aggregate.html#getNamedAggCalls()">getNamedAggCalls</a>, <a href="../../rel/core/Aggregate.html#isNotGrandTotal(org.apache.calcite.rel.core.Aggregate)">isNotGrandTotal</a>, <a href="../../rel/core/Aggregate.html#isSimple(org.apache.calcite.rel.core.Aggregate)">isSimple</a>, <a href="../../rel/core/Aggregate.html#isValid(org.apache.calcite.util.Litmus,org.apache.calcite.rel.RelNode.Context)">isValid</a>, <a href="../../rel/core/Aggregate.html#noIndicator(org.apache.calcite.rel.core.Aggregate)">noIndicator</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.apache.calcite.rel.SingleRel">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.calcite.rel.<a href="../../rel/SingleRel.html" title="class in org.apache.calcite.rel">SingleRel</a></h3>
<code><a href="../../rel/SingleRel.html#childrenAccept(org.apache.calcite.rel.RelVisitor)">childrenAccept</a>, <a href="../../rel/SingleRel.html#getInput()">getInput</a>, <a href="../../rel/SingleRel.html#getInputs()">getInputs</a>, <a href="../../rel/SingleRel.html#replaceInput(int,org.apache.calcite.rel.RelNode)">replaceInput</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.apache.calcite.rel.AbstractRelNode">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.calcite.rel.<a href="../../rel/AbstractRelNode.html" title="class in org.apache.calcite.rel">AbstractRelNode</a></h3>
<code><a href="../../rel/AbstractRelNode.html#accept(org.apache.calcite.rel.RelShuttle)">accept</a>, <a href="../../rel/AbstractRelNode.html#accept(org.apache.calcite.rex.RexShuttle)">accept</a>, <a href="../../rel/AbstractRelNode.html#collectVariablesSet(java.util.Set)">collectVariablesSet</a>, <a href="../../rel/AbstractRelNode.html#collectVariablesUsed(java.util.Set)">collectVariablesUsed</a>, <a href="../../rel/AbstractRelNode.html#computeDigest()">computeDigest</a>, <a href="../../rel/AbstractRelNode.html#computeSelfCost(org.apache.calcite.plan.RelOptPlanner)">computeSelfCost</a>, <a href="../../rel/AbstractRelNode.html#explain(org.apache.calcite.rel.RelWriter)">explain</a>, <a href="../../rel/AbstractRelNode.html#getChildExps()">getChildExps</a>, <a href="../../rel/AbstractRelNode.html#getCluster()">getCluster</a>, <a href="../../rel/AbstractRelNode.html#getCollationList()">getCollationList</a>, <a href="../../rel/AbstractRelNode.html#getConvention()">getConvention</a>, <a href="../../rel/AbstractRelNode.html#getCorrelVariable()">getCorrelVariable</a>, <a href="../../rel/AbstractRelNode.html#getDescription()">getDescription</a>, <a href="../../rel/AbstractRelNode.html#getDigest()">getDigest</a>, <a href="../../rel/AbstractRelNode.html#getExpectedInputRowType(int)">getExpectedInputRowType</a>, <a href="../../rel/AbstractRelNode.html#getId()">getId</a>, <a href="../../rel/AbstractRelNode.html#getInput(int)">getInput</a>, <a href="../../rel/AbstractRelNode.html#getQuery()">getQuery</a>, <a href="../../rel/AbstractRelNode.html#getRelTypeName()">getRelTypeName</a>, <a href="../../rel/AbstractRelNode.html#getRows()">getRows</a>, <a href="../../rel/AbstractRelNode.html#getRowType()">getRowType</a>, <a href="../../rel/AbstractRelNode.html#getTraitSet()">getTraitSet</a>, <a href="../../rel/AbstractRelNode.html#getVariablesSet()">getVariablesSet</a>, <a href="../../rel/AbstractRelNode.html#getVariablesStopped()">getVariablesStopped</a>, <a href="../../rel/AbstractRelNode.html#isDistinct()">isDistinct</a>, <a href="../../rel/AbstractRelNode.html#isKey(org.apache.calcite.util.ImmutableBitSet)">isKey</a>, <a href="../../rel/AbstractRelNode.html#isValid(boolean)">isValid</a>, <a href="../../rel/AbstractRelNode.html#metadata(java.lang.Class,org.apache.calcite.rel.metadata.RelMetadataQuery)">metadata</a>, <a href="../../rel/AbstractRelNode.html#onRegister(org.apache.calcite.plan.RelOptPlanner)">onRegister</a>, <a href="../../rel/AbstractRelNode.html#recomputeDigest()">recomputeDigest</a>, <a href="../../rel/AbstractRelNode.html#register(org.apache.calcite.plan.RelOptPlanner)">register</a>, <a href="../../rel/AbstractRelNode.html#sole(java.util.List)">sole</a>, <a href="../../rel/AbstractRelNode.html#toString()">toString</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="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, wait, wait, wait</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.apache.calcite.rel.RelNode">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.apache.calcite.rel.<a href="../../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a></h3>
<code><a href="../../rel/RelNode.html#accept(org.apache.calcite.rel.RelShuttle)">accept</a>, <a href="../../rel/RelNode.html#accept(org.apache.calcite.rex.RexShuttle)">accept</a>, <a href="../../rel/RelNode.html#childrenAccept(org.apache.calcite.rel.RelVisitor)">childrenAccept</a>, <a href="../../rel/RelNode.html#collectVariablesSet(java.util.Set)">collectVariablesSet</a>, <a href="../../rel/RelNode.html#collectVariablesUsed(java.util.Set)">collectVariablesUsed</a>, <a href="../../rel/RelNode.html#computeSelfCost(org.apache.calcite.plan.RelOptPlanner)">computeSelfCost</a>, <a href="../../rel/RelNode.html#computeSelfCost(org.apache.calcite.plan.RelOptPlanner,org.apache.calcite.rel.metadata.RelMetadataQuery)">computeSelfCost</a>, <a href="../../rel/RelNode.html#copy(org.apache.calcite.plan.RelTraitSet,java.util.List)">copy</a>, <a href="../../rel/RelNode.html#estimateRowCount(org.apache.calcite.rel.metadata.RelMetadataQuery)">estimateRowCount</a>, <a href="../../rel/RelNode.html#explain(org.apache.calcite.rel.RelWriter)">explain</a>, <a href="../../rel/RelNode.html#getChildExps()">getChildExps</a>, <a href="../../rel/RelNode.html#getCollationList()">getCollationList</a>, <a href="../../rel/RelNode.html#getConvention()">getConvention</a>, <a href="../../rel/RelNode.html#getCorrelVariable()">getCorrelVariable</a>, <a href="../../rel/RelNode.html#getExpectedInputRowType(int)">getExpectedInputRowType</a>, <a href="../../rel/RelNode.html#getInput(int)">getInput</a>, <a href="../../rel/RelNode.html#getInputs()">getInputs</a>, <a href="../../rel/RelNode.html#getQuery()">getQuery</a>, <a href="../../rel/RelNode.html#getRelTypeName()">getRelTypeName</a>, <a href="../../rel/RelNode.html#getRows()">getRows</a>, <a href="../../rel/RelNode.html#getRowType()">getRowType</a>, <a href="../../rel/RelNode.html#getVariablesSet()">getVariablesSet</a>, <a href="../../rel/RelNode.html#getVariablesStopped()">getVariablesStopped</a>, <a href="../../rel/RelNode.html#isDistinct()">isDistinct</a>, <a href="../../rel/RelNode.html#isKey(org.apache.calcite.util.ImmutableBitSet)">isKey</a>, <a href="../../rel/RelNode.html#isValid(boolean)">isValid</a>, <a href="../../rel/RelNode.html#isValid(org.apache.calcite.util.Litmus,org.apache.calcite.rel.RelNode.Context)">isValid</a>, <a href="../../rel/RelNode.html#metadata(java.lang.Class,org.apache.calcite.rel.metadata.RelMetadataQuery)">metadata</a>, <a href="../../rel/RelNode.html#onRegister(org.apache.calcite.plan.RelOptPlanner)">onRegister</a>, <a href="../../rel/RelNode.html#recomputeDigest()">recomputeDigest</a>, <a href="../../rel/RelNode.html#register(org.apache.calcite.plan.RelOptPlanner)">register</a>, <a href="../../rel/RelNode.html#replaceInput(int,org.apache.calcite.rel.RelNode)">replaceInput</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.apache.calcite.plan.RelOptNode">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.apache.calcite.plan.<a href="../../plan/RelOptNode.html" title="interface in org.apache.calcite.plan">RelOptNode</a></h3>
<code><a href="../../plan/RelOptNode.html#getCluster()">getCluster</a>, <a href="../../plan/RelOptNode.html#getDescription()">getDescription</a>, <a href="../../plan/RelOptNode.html#getDigest()">getDigest</a>, <a href="../../plan/RelOptNode.html#getId()">getId</a>, <a href="../../plan/RelOptNode.html#getTraitSet()">getTraitSet</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a id="DISTINCT_FIELD_SUFFIX">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DISTINCT_FIELD_SUFFIX</h4>
<pre>public static final&nbsp;java.lang.String DISTINCT_FIELD_SUFFIX</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.calcite.adapter.pig.PigAggregate.DISTINCT_FIELD_SUFFIX">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;(org.apache.calcite.plan.RelOptCluster,org.apache.calcite.plan.RelTraitSet,org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.List,java.util.List)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PigAggregate</h4>
<pre>public&nbsp;PigAggregate&#8203;(<a href="../../plan/RelOptCluster.html" title="class in org.apache.calcite.plan">RelOptCluster</a>&nbsp;cluster,
<a href="../../plan/RelTraitSet.html" title="class in org.apache.calcite.plan">RelTraitSet</a>&nbsp;traitSet,
<a href="../../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;input,
<a href="../../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;groupSet,
java.util.List&lt;<a href="../../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&gt;&nbsp;groupSets,
java.util.List&lt;<a href="../../rel/core/AggregateCall.html" title="class in org.apache.calcite.rel.core">AggregateCall</a>&gt;&nbsp;aggCalls)</pre>
<div class="block">Creates a PigAggregate.</div>
</li>
</ul>
<a id="&lt;init&gt;(org.apache.calcite.plan.RelOptCluster,org.apache.calcite.plan.RelTraitSet,org.apache.calcite.rel.RelNode,boolean,org.apache.calcite.util.ImmutableBitSet,java.util.List,java.util.List)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>PigAggregate</h4>
<pre>@Deprecated
public&nbsp;PigAggregate&#8203;(<a href="../../plan/RelOptCluster.html" title="class in org.apache.calcite.plan">RelOptCluster</a>&nbsp;cluster,
<a href="../../plan/RelTraitSet.html" title="class in org.apache.calcite.plan">RelTraitSet</a>&nbsp;traitSet,
<a href="../../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;input,
boolean&nbsp;indicator,
<a href="../../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;groupSet,
java.util.List&lt;<a href="../../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&gt;&nbsp;groupSets,
java.util.List&lt;<a href="../../rel/core/AggregateCall.html" title="class in org.apache.calcite.rel.core">AggregateCall</a>&gt;&nbsp;aggCalls)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="copy(org.apache.calcite.plan.RelTraitSet,org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.List,java.util.List)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre class="methodSignature">public&nbsp;<a href="../../rel/core/Aggregate.html" title="class in org.apache.calcite.rel.core">Aggregate</a>&nbsp;copy&#8203;(<a href="../../plan/RelTraitSet.html" title="class in org.apache.calcite.plan">RelTraitSet</a>&nbsp;traitSet,
<a href="../../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;input,
<a href="../../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;groupSet,
java.util.List&lt;<a href="../../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&gt;&nbsp;groupSets,
java.util.List&lt;<a href="../../rel/core/AggregateCall.html" title="class in org.apache.calcite.rel.core">AggregateCall</a>&gt;&nbsp;aggCalls)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../rel/core/Aggregate.html#copy(org.apache.calcite.plan.RelTraitSet,org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.List,java.util.List)">Aggregate</a></code></span></div>
<div class="block">Creates a copy of this aggregate.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../rel/core/Aggregate.html#copy(org.apache.calcite.plan.RelTraitSet,org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.List,java.util.List)">copy</a></code>&nbsp;in class&nbsp;<code><a href="../../rel/core/Aggregate.html" title="class in org.apache.calcite.rel.core">Aggregate</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>traitSet</code> - Traits</dd>
<dd><code>input</code> - Input</dd>
<dd><code>groupSet</code> - Bit set of grouping fields</dd>
<dd><code>groupSets</code> - List of all grouping sets; null for just <code>groupSet</code></dd>
<dd><code>aggCalls</code> - Collection of calls to aggregate functions</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>New <code>Aggregate</code> if any parameter differs from the value of
this <code>Aggregate</code>, or just <code>this</code> if all the parameters are
the same</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../rel/core/Aggregate.html#copy(org.apache.calcite.plan.RelTraitSet,java.util.List)"><code>Aggregate.copy(org.apache.calcite.plan.RelTraitSet, java.util.List)</code></a></dd>
</dl>
</li>
</ul>
<a id="implement(org.apache.calcite.adapter.pig.PigRel.Implementor)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>implement</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;implement&#8203;(<a href="PigRel.Implementor.html" title="class in org.apache.calcite.adapter.pig">PigRel.Implementor</a>&nbsp;implementor)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="PigRel.html#implement(org.apache.calcite.adapter.pig.PigRel.Implementor)">PigRel</a></code></span></div>
<div class="block">Converts this node to a Pig Latin statement.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="PigRel.html#implement(org.apache.calcite.adapter.pig.PigRel.Implementor)">implement</a></code>&nbsp;in interface&nbsp;<code><a href="PigRel.html" title="interface in org.apache.calcite.adapter.pig">PigRel</a></code></dd>
</dl>
</li>
</ul>
<a id="getPigAggregateStatement(org.apache.calcite.adapter.pig.PigRel.Implementor)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPigAggregateStatement</h4>
<pre class="methodSignature">private&nbsp;java.lang.String&nbsp;getPigAggregateStatement&#8203;(<a href="PigRel.Implementor.html" title="class in org.apache.calcite.adapter.pig">PigRel.Implementor</a>&nbsp;implementor)</pre>
<div class="block">Generates a GROUP BY statement, followed by an optional FOREACH statement
for all aggregate functions used. e.g.
<pre>
<code>
A = GROUP A BY owner;
A = FOREACH A GENERATE group, SUM(A.pet_num);
</code>
</pre></div>
</li>
</ul>
<a id="getTable()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTable</h4>
<pre class="methodSignature">public&nbsp;<a href="../../plan/RelOptTable.html" title="interface in org.apache.calcite.plan">RelOptTable</a>&nbsp;getTable()</pre>
<div class="block">Override this method so it looks down the tree to find the table this node
is acting on.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../rel/RelNode.html#getTable()">getTable</a></code>&nbsp;in interface&nbsp;<code><a href="../../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a></code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../rel/AbstractRelNode.html#getTable()">getTable</a></code>&nbsp;in class&nbsp;<code><a href="../../rel/AbstractRelNode.html" title="class in org.apache.calcite.rel">AbstractRelNode</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>If this relational expression represents an access to a table,
returns that table, otherwise returns null</dd>
</dl>
</li>
</ul>
<a id="getPigGroupBy(org.apache.calcite.adapter.pig.PigRel.Implementor)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPigGroupBy</h4>
<pre class="methodSignature">private&nbsp;java.lang.String&nbsp;getPigGroupBy&#8203;(<a href="PigRel.Implementor.html" title="class in org.apache.calcite.adapter.pig">PigRel.Implementor</a>&nbsp;implementor)</pre>
<div class="block">Generates the GROUP BY statement, e.g.
<code>A = GROUP A BY (f1, f2);</code></div>
</li>
</ul>
<a id="getPigForEachGenerate(org.apache.calcite.adapter.pig.PigRel.Implementor)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPigForEachGenerate</h4>
<pre class="methodSignature">private&nbsp;java.lang.String&nbsp;getPigForEachGenerate&#8203;(<a href="PigRel.Implementor.html" title="class in org.apache.calcite.adapter.pig">PigRel.Implementor</a>&nbsp;implementor)</pre>
<div class="block">Generates a FOREACH statement containing invocation of aggregate functions
and projection of grouped fields. e.g.
<code>A = FOREACH A GENERATE group, SUM(A.pet_num);</code></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>documentation for special meaning of the "group" field after GROUP
BY.</code></dd>
</dl>
</li>
</ul>
<a id="getPigGenerateCall(org.apache.calcite.adapter.pig.PigRel.Implementor)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPigGenerateCall</h4>
<pre class="methodSignature">private&nbsp;java.lang.String&nbsp;getPigGenerateCall&#8203;(<a href="PigRel.Implementor.html" title="class in org.apache.calcite.adapter.pig">PigRel.Implementor</a>&nbsp;implementor)</pre>
</li>
</ul>
<a id="getPigAggregateCalls(org.apache.calcite.adapter.pig.PigRel.Implementor)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPigAggregateCalls</h4>
<pre class="methodSignature">private&nbsp;java.util.List&lt;java.lang.String&gt;&nbsp;getPigAggregateCalls&#8203;(<a href="PigRel.Implementor.html" title="class in org.apache.calcite.adapter.pig">PigRel.Implementor</a>&nbsp;implementor)</pre>
</li>
</ul>
<a id="getPigAggregateCall(java.lang.String,org.apache.calcite.rel.core.AggregateCall)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPigAggregateCall</h4>
<pre class="methodSignature">private&nbsp;java.lang.String&nbsp;getPigAggregateCall&#8203;(java.lang.String&nbsp;relAlias,
<a href="../../rel/core/AggregateCall.html" title="class in org.apache.calcite.rel.core">AggregateCall</a>&nbsp;aggCall)</pre>
</li>
</ul>
<a id="toPigAggFunc(org.apache.calcite.rel.core.AggregateCall)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toPigAggFunc</h4>
<pre class="methodSignature">private&nbsp;<a href="PigAggFunction.html" title="enum in org.apache.calcite.adapter.pig">PigAggFunction</a>&nbsp;toPigAggFunc&#8203;(<a href="../../rel/core/AggregateCall.html" title="class in org.apache.calcite.rel.core">AggregateCall</a>&nbsp;aggCall)</pre>
</li>
</ul>
<a id="getArgNames(java.lang.String,org.apache.calcite.rel.core.AggregateCall)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getArgNames</h4>
<pre class="methodSignature">private&nbsp;java.util.List&lt;java.lang.String&gt;&nbsp;getArgNames&#8203;(java.lang.String&nbsp;relAlias,
<a href="../../rel/core/AggregateCall.html" title="class in org.apache.calcite.rel.core">AggregateCall</a>&nbsp;aggCall)</pre>
</li>
</ul>
<a id="getInputFieldNameForAggCall(java.lang.String,org.apache.calcite.rel.core.AggregateCall,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInputFieldNameForAggCall</h4>
<pre class="methodSignature">private&nbsp;java.lang.String&nbsp;getInputFieldNameForAggCall&#8203;(java.lang.String&nbsp;relAlias,
<a href="../../rel/core/AggregateCall.html" title="class in org.apache.calcite.rel.core">AggregateCall</a>&nbsp;aggCall,
int&nbsp;fieldIndex)</pre>
</li>
</ul>
<a id="getDistinctCalls(org.apache.calcite.adapter.pig.PigRel.Implementor)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDistinctCalls</h4>
<pre class="methodSignature">private&nbsp;java.util.List&lt;java.lang.String&gt;&nbsp;getDistinctCalls&#8203;(<a href="PigRel.Implementor.html" title="class in org.apache.calcite.adapter.pig">PigRel.Implementor</a>&nbsp;implementor)</pre>
<div class="block">A agg function call like <code>COUNT(DISTINCT COL)</code> in Pig is
achieved via two statements in a FOREACH that follows a GROUP statement:
<blockquote>
<code>
TABLE = GROUP TABLE ALL;<br>
TABLE = FOREACH TABLE {<br>
&nbsp;&nbsp;<b>COL.DISTINCT = DISTINCT COL;<br>
&nbsp;&nbsp;GENERATE COUNT(COL.DISTINCT) AS C;</b><br>
}</code>
</blockquote></div>
</li>
</ul>
<a id="getInputFieldName(int)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getInputFieldName</h4>
<pre class="methodSignature">private&nbsp;java.lang.String&nbsp;getInputFieldName&#8203;(int&nbsp;fieldIndex)</pre>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/PigAggregate.html">Use</a></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" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2012&#x2013;2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>