blob: 29c6f6f640b0982c51d2cac9cd1b0eb817e6f627 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>RelDataTypeSystem (Apache Calcite 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="RelDataTypeSystem (Apache Calcite calcite API)";
}
}
catch(err) {
}
//-->
var data = {"i0":6,"i1":6,"i2":18,"i3":18,"i4":18,"i5":18,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":6,"i16":6,"i17":6,"i18":6,"i19":6,"i20":18};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],16:["t5","Default 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="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 class="aboutLanguage"><b>Apache Calcite</b></div>
</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>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&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><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&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.rel.type</a></div>
<h2 title="Interface RelDataTypeSystem" class="title">Interface RelDataTypeSystem</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="DelegatingTypeSystem.html" title="class in org.apache.calcite.rel.type">DelegatingTypeSystem</a></code>, <code><a href="RelDataTypeSystemImpl.html" title="class in org.apache.calcite.rel.type">RelDataTypeSystemImpl</a></code></dd>
</dl>
<hr>
<pre>public interface <span class="typeNameLabel">RelDataTypeSystem</span></pre>
<div class="block">Type system.
<p>Provides behaviors concerning type limits and behaviors. For example,
in the default system, a DECIMAL can have maximum precision 19, but Hive
overrides to 38.
<p>The default implementation is <a href="#DEFAULT"><code>DEFAULT</code></a>.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== 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 <a href="RelDataTypeSystem.html" title="interface in org.apache.calcite.rel.type">RelDataTypeSystem</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT">DEFAULT</a></span></code></th>
<td class="colLast">
<div class="block">Default type system.</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="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t5" class="tableTab"><span><a href="javascript:show(16);">Default 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="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#deriveAvgAggType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType)">deriveAvgAggType</a></span>&#8203;(<a href="RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;argumentType)</code></th>
<td class="colLast">
<div class="block">Returns the return type of a call to the <code>AVG</code>, <code>STDDEV</code> or
<code>VAR</code> aggregate functions, inferred from its argument type.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#deriveCovarType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">deriveCovarType</a></span>&#8203;(<a href="RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;arg0Type,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;arg1Type)</code></th>
<td class="colLast">
<div class="block">Returns the return type of a call to the <code>COVAR</code> aggregate function,
inferred from its argument types.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>default <a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#deriveDecimalDivideType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">deriveDecimalDivideType</a></span>&#8203;(<a href="RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type1,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type2)</code></th>
<td class="colLast">
<div class="block">Infers the return type of a decimal division.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>default <a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#deriveDecimalModType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">deriveDecimalModType</a></span>&#8203;(<a href="RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type1,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type2)</code></th>
<td class="colLast">
<div class="block">Infers the return type of a decimal modulus operation.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>default <a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#deriveDecimalMultiplyType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">deriveDecimalMultiplyType</a></span>&#8203;(<a href="RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type1,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type2)</code></th>
<td class="colLast">
<div class="block">Infers the return type of a decimal multiplication.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>default <a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#deriveDecimalPlusType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">deriveDecimalPlusType</a></span>&#8203;(<a href="RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type1,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type2)</code></th>
<td class="colLast">
<div class="block">Infers the return type of a decimal addition.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#deriveFractionalRankType(org.apache.calcite.rel.type.RelDataTypeFactory)">deriveFractionalRankType</a></span>&#8203;(<a href="RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory)</code></th>
<td class="colLast">
<div class="block">Returns the return type of the <code>CUME_DIST</code> and <code>PERCENT_RANK</code>
aggregate functions.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#deriveRankType(org.apache.calcite.rel.type.RelDataTypeFactory)">deriveRankType</a></span>&#8203;(<a href="RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory)</code></th>
<td class="colLast">
<div class="block">Returns the return type of the <code>NTILE</code>, <code>RANK</code>,
<code>DENSE_RANK</code>, and <code>ROW_NUMBER</code> aggregate functions.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#deriveSumType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType)">deriveSumType</a></span>&#8203;(<a href="RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;argumentType)</code></th>
<td class="colLast">
<div class="block">Returns the return type of a call to the <code>SUM</code> aggregate function,
inferred from its argument type.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDefaultPrecision(org.apache.calcite.sql.type.SqlTypeName)">getDefaultPrecision</a></span>&#8203;(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</code></th>
<td class="colLast">
<div class="block">Returns default precision for this type if supported, otherwise -1 if
precision is either unsupported or must be specified explicitly.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLiteral(org.apache.calcite.sql.type.SqlTypeName,boolean)">getLiteral</a></span>&#8203;(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
boolean&nbsp;isPrefix)</code></th>
<td class="colLast">
<div class="block">Returns the LITERAL string for the type, either PREFIX/SUFFIX.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMaxNumericPrecision()">getMaxNumericPrecision</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the maximum precision of a NUMERIC or DECIMAL type.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMaxNumericScale()">getMaxNumericScale</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the maximum scale of a NUMERIC or DECIMAL type.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMaxPrecision(org.apache.calcite.sql.type.SqlTypeName)">getMaxPrecision</a></span>&#8203;(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</code></th>
<td class="colLast">
<div class="block">Returns the maximum precision (or length) allowed for this type, or -1 if
precision/length are not applicable for this type.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMaxScale(org.apache.calcite.sql.type.SqlTypeName)">getMaxScale</a></span>&#8203;(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</code></th>
<td class="colLast">
<div class="block">Returns the maximum scale of a given type.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getNumTypeRadix(org.apache.calcite.sql.type.SqlTypeName)">getNumTypeRadix</a></span>&#8203;(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</code></th>
<td class="colLast">
<div class="block">Returns the numeric type radix, typically 2 or 10.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isAutoincrement(org.apache.calcite.sql.type.SqlTypeName)">isAutoincrement</a></span>&#8203;(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</code></th>
<td class="colLast">
<div class="block">Returns whether the type can be auto increment.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isCaseSensitive(org.apache.calcite.sql.type.SqlTypeName)">isCaseSensitive</a></span>&#8203;(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</code></th>
<td class="colLast">
<div class="block">Returns whether the type is case sensitive.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isSchemaCaseSensitive()">isSchemaCaseSensitive</a></span>()</code></th>
<td class="colLast">
<div class="block">Whether two record types are considered distinct if their field names
are the same but in different cases.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#shouldConvertRaggedUnionTypesToVarying()">shouldConvertRaggedUnionTypesToVarying</a></span>()</code></th>
<td class="colLast">
<div class="block">Whether the least restrictive type of a number of CHAR types of different
lengths should be a VARCHAR type.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>default boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#shouldUseDoubleMultiplication(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">shouldUseDoubleMultiplication</a></span>&#8203;(<a href="RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type1,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type2)</code></th>
<td class="colLast">
<div class="block">Returns whether a decimal multiplication should be implemented by casting
arguments to double values.</div>
</td>
</tr>
</table>
</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="DEFAULT">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DEFAULT</h4>
<pre>static final&nbsp;<a href="RelDataTypeSystem.html" title="interface in org.apache.calcite.rel.type">RelDataTypeSystem</a> DEFAULT</pre>
<div class="block">Default type system.</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="getMaxScale(org.apache.calcite.sql.type.SqlTypeName)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxScale</h4>
<pre class="methodSignature">int&nbsp;getMaxScale&#8203;(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</pre>
<div class="block">Returns the maximum scale of a given type.</div>
</li>
</ul>
<a id="getDefaultPrecision(org.apache.calcite.sql.type.SqlTypeName)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDefaultPrecision</h4>
<pre class="methodSignature">int&nbsp;getDefaultPrecision&#8203;(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</pre>
<div class="block">Returns default precision for this type if supported, otherwise -1 if
precision is either unsupported or must be specified explicitly.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Default precision</dd>
</dl>
</li>
</ul>
<a id="getMaxPrecision(org.apache.calcite.sql.type.SqlTypeName)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxPrecision</h4>
<pre class="methodSignature">int&nbsp;getMaxPrecision&#8203;(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</pre>
<div class="block">Returns the maximum precision (or length) allowed for this type, or -1 if
precision/length are not applicable for this type.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Maximum allowed precision</dd>
</dl>
</li>
</ul>
<a id="getMaxNumericScale()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxNumericScale</h4>
<pre class="methodSignature">int&nbsp;getMaxNumericScale()</pre>
<div class="block">Returns the maximum scale of a NUMERIC or DECIMAL type.</div>
</li>
</ul>
<a id="getMaxNumericPrecision()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxNumericPrecision</h4>
<pre class="methodSignature">int&nbsp;getMaxNumericPrecision()</pre>
<div class="block">Returns the maximum precision of a NUMERIC or DECIMAL type.</div>
</li>
</ul>
<a id="getLiteral(org.apache.calcite.sql.type.SqlTypeName,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLiteral</h4>
<pre class="methodSignature"><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;getLiteral&#8203;(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
boolean&nbsp;isPrefix)</pre>
<div class="block">Returns the LITERAL string for the type, either PREFIX/SUFFIX.</div>
</li>
</ul>
<a id="isCaseSensitive(org.apache.calcite.sql.type.SqlTypeName)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isCaseSensitive</h4>
<pre class="methodSignature">boolean&nbsp;isCaseSensitive&#8203;(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</pre>
<div class="block">Returns whether the type is case sensitive.</div>
</li>
</ul>
<a id="isAutoincrement(org.apache.calcite.sql.type.SqlTypeName)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isAutoincrement</h4>
<pre class="methodSignature">boolean&nbsp;isAutoincrement&#8203;(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</pre>
<div class="block">Returns whether the type can be auto increment.</div>
</li>
</ul>
<a id="getNumTypeRadix(org.apache.calcite.sql.type.SqlTypeName)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNumTypeRadix</h4>
<pre class="methodSignature">int&nbsp;getNumTypeRadix&#8203;(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</pre>
<div class="block">Returns the numeric type radix, typically 2 or 10.
0 means "not applicable".</div>
</li>
</ul>
<a id="deriveSumType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deriveSumType</h4>
<pre class="methodSignature"><a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;deriveSumType&#8203;(<a href="RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;argumentType)</pre>
<div class="block">Returns the return type of a call to the <code>SUM</code> aggregate function,
inferred from its argument type.</div>
</li>
</ul>
<a id="deriveAvgAggType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deriveAvgAggType</h4>
<pre class="methodSignature"><a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;deriveAvgAggType&#8203;(<a href="RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;argumentType)</pre>
<div class="block">Returns the return type of a call to the <code>AVG</code>, <code>STDDEV</code> or
<code>VAR</code> aggregate functions, inferred from its argument type.</div>
</li>
</ul>
<a id="deriveCovarType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deriveCovarType</h4>
<pre class="methodSignature"><a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;deriveCovarType&#8203;(<a href="RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;arg0Type,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;arg1Type)</pre>
<div class="block">Returns the return type of a call to the <code>COVAR</code> aggregate function,
inferred from its argument types.</div>
</li>
</ul>
<a id="deriveFractionalRankType(org.apache.calcite.rel.type.RelDataTypeFactory)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deriveFractionalRankType</h4>
<pre class="methodSignature"><a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;deriveFractionalRankType&#8203;(<a href="RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory)</pre>
<div class="block">Returns the return type of the <code>CUME_DIST</code> and <code>PERCENT_RANK</code>
aggregate functions.</div>
</li>
</ul>
<a id="deriveRankType(org.apache.calcite.rel.type.RelDataTypeFactory)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deriveRankType</h4>
<pre class="methodSignature"><a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;deriveRankType&#8203;(<a href="RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory)</pre>
<div class="block">Returns the return type of the <code>NTILE</code>, <code>RANK</code>,
<code>DENSE_RANK</code>, and <code>ROW_NUMBER</code> aggregate functions.</div>
</li>
</ul>
<a id="isSchemaCaseSensitive()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isSchemaCaseSensitive</h4>
<pre class="methodSignature">boolean&nbsp;isSchemaCaseSensitive()</pre>
<div class="block">Whether two record types are considered distinct if their field names
are the same but in different cases.</div>
</li>
</ul>
<a id="shouldConvertRaggedUnionTypesToVarying()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shouldConvertRaggedUnionTypesToVarying</h4>
<pre class="methodSignature">boolean&nbsp;shouldConvertRaggedUnionTypesToVarying()</pre>
<div class="block">Whether the least restrictive type of a number of CHAR types of different
lengths should be a VARCHAR type. And similarly BINARY to VARBINARY.</div>
</li>
</ul>
<a id="shouldUseDoubleMultiplication(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shouldUseDoubleMultiplication</h4>
<pre class="methodSignature">default&nbsp;boolean&nbsp;shouldUseDoubleMultiplication&#8203;(<a href="RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type1,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type2)</pre>
<div class="block">Returns whether a decimal multiplication should be implemented by casting
arguments to double values.
<p>Pre-condition: <code>createDecimalProduct(type1, type2) != null</code></div>
</li>
</ul>
<a id="deriveDecimalPlusType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deriveDecimalPlusType</h4>
<pre class="methodSignature">default&nbsp;<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;deriveDecimalPlusType&#8203;(<a href="RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type1,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type2)</pre>
<div class="block">Infers the return type of a decimal addition. Decimal addition involves
at least one decimal operand and requires both operands to have exact
numeric types.
<p>Rules:
<ul>
<li>Let p1, s1 be the precision and scale of the first operand</li>
<li>Let p2, s2 be the precision and scale of the second operand</li>
<li>Let p, s be the precision and scale of the result</li>
<li>Let d be the number of whole digits in the result</li>
<li>Then the result type is a decimal with:
<ul>
<li>s = max(s1, s2)</li>
<li>p = max(p1 - s1, p2 - s2) + s + 1</li>
</ul>
</li>
<li>p and s are capped at their maximum values</li>
</ul></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>typeFactory</code> - TypeFactory used to create output type</dd>
<dd><code>type1</code> - Type of the first operand</dd>
<dd><code>type2</code> - Type of the second operand</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Result type for a decimal addition</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../util/Glossary.html#SQL2003"><code>SQL:2003 Part 2 Section 6.26</code></a></dd>
</dl>
</li>
</ul>
<a id="deriveDecimalMultiplyType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deriveDecimalMultiplyType</h4>
<pre class="methodSignature">default&nbsp;<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;deriveDecimalMultiplyType&#8203;(<a href="RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type1,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type2)</pre>
<div class="block">Infers the return type of a decimal multiplication. Decimal
multiplication involves at least one decimal operand and requires both
operands to have exact numeric types.
<p>The default implementation is SQL:2003 compliant.
<p>Rules:
<ul>
<li>Let p1, s1 be the precision and scale of the first operand</li>
<li>Let p2, s2 be the precision and scale of the second operand</li>
<li>Let p, s be the precision and scale of the result</li>
<li>Let d be the number of whole digits in the result</li>
<li>Then the result type is a decimal with:
<ul>
<li>p = p1 + p2)</li>
<li>s = s1 + s2</li>
</ul>
</li>
<li>p and s are capped at their maximum values</li>
</ul>
<p>p and s are capped at their maximum values</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>typeFactory</code> - TypeFactory used to create output type</dd>
<dd><code>type1</code> - Type of the first operand</dd>
<dd><code>type2</code> - Type of the second operand</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Result type for a decimal multiplication, or null if decimal
multiplication should not be applied to the operands</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../util/Glossary.html#SQL2003"><code>SQL:2003 Part 2 Section 6.26</code></a></dd>
</dl>
</li>
</ul>
<a id="deriveDecimalDivideType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deriveDecimalDivideType</h4>
<pre class="methodSignature">default&nbsp;<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;deriveDecimalDivideType&#8203;(<a href="RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type1,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type2)</pre>
<div class="block">Infers the return type of a decimal division. Decimal division involves
at least one decimal operand and requires both operands to have exact
numeric types.
<p>The default implementation is SQL:2003 compliant.
<p>Rules:
<ul>
<li>Let p1, s1 be the precision and scale of the first operand</li>
<li>Let p2, s2 be the precision and scale of the second operand</li>
<li>Let p, s be the precision and scale of the result</li>
<li>Let d be the number of whole digits in the result</li>
<li>Then the result type is a decimal with:
<ul>
<li>d = p1 - s1 + s2</li>
<li>s &lt; max(6, s1 + p2 + 1)</li>
<li>p = d + s</li>
</ul>
</li>
<li>p and s are capped at their maximum values</li>
</ul></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>typeFactory</code> - TypeFactory used to create output type</dd>
<dd><code>type1</code> - Type of the first operand</dd>
<dd><code>type2</code> - Type of the second operand</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Result type for a decimal division, or null if decimal
division should not be applied to the operands</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../util/Glossary.html#SQL2003"><code>SQL:2003 Part 2 Section 6.26</code></a></dd>
</dl>
</li>
</ul>
<a id="deriveDecimalModType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>deriveDecimalModType</h4>
<pre class="methodSignature">default&nbsp;<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;deriveDecimalModType&#8203;(<a href="RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type1,
<a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type2)</pre>
<div class="block">Infers the return type of a decimal modulus operation. Decimal modulus
involves at least one decimal operand.
<p>The default implementation is SQL:2003 compliant: the declared type of
the result is the declared type of the second operand (expression divisor).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>typeFactory</code> - TypeFactory used to create output type</dd>
<dd><code>type1</code> - Type of the first operand</dd>
<dd><code>type2</code> - Type of the second operand</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Result type for a decimal modulus, or null if decimal
modulus should not be applied to the operands</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../util/Glossary.html#SQL2003"><code>SQL:2003 Part 2 Section 6.27
Rules:
Let p1, s1 be the precision and scale of the first operand
Let p2, s2 be the precision and scale of the second operand
Let p, s be the precision and scale of the result
Let d be the number of whole digits in the result
Then the result type is a decimal with:
s = max(s1, s2)
p = min(p1 - s1, p2 - s2) + max(s1, s2)
p and s are capped at their maximum values
</code></a></dd>
</dl>
</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="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 class="aboutLanguage"><b>Apache Calcite</b></div>
</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>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&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><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&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 &copy; 2012-2020 Apache Software Foundation. All Rights Reserved.</small></p>
</footer>
</body>
</html>