blob: 6366a2fee89316fecb64365c09f27695f4c0814b [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>RelDataTypeSystem (Apache Calcite API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="declaration: package: org.apache.calcite.rel.type, interface: RelDataTypeSystem">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../script-dir/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="../../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var evenRowColor = "even-row-color";
var oddRowColor = "odd-row-color";
var tableTab = "table-tab";
var activeTableTab = "active-table-tab";
var pathtoroot = "../../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<div class="about-language"><b>Apache Calcite</b></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">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#class">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<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="sub-nav-list">
<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>
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.calcite.rel.type</a></div>
<h1 title="Interface RelDataTypeSystem" class="title">Interface RelDataTypeSystem</h1>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<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>, <code><a href="../../test/SqlOperatorTest.CustomTimeFrameTypeSystem.html" title="class in org.apache.calcite.test">SqlOperatorTest.CustomTimeFrameTypeSystem</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public interface </span><span class="element-name type-name-label">RelDataTypeSystem</span></div>
<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>
</section>
<section class="summary">
<ul class="summary-list">
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="caption"><span>Fields</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>static final <a href="RelDataTypeSystem.html" title="interface in org.apache.calcite.rel.type">RelDataTypeSystem</a></code></div>
<div class="col-second even-row-color"><code><a href="#DEFAULT" class="member-name-link">DEFAULT</a></code></div>
<div class="col-last even-row-color">
<div class="block">Default type system.</div>
</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract Methods</button><button id="method-summary-table-tab5" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab5', 3)" class="table-tab">Default Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#deriveAvgAggType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType)" class="member-name-link">deriveAvgAggType</a><wbr>(<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></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<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>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#deriveCovarType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)" class="member-name-link">deriveCovarType</a><wbr>(<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></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns the return type of a call to the <code>COVAR</code> aggregate function,
inferred from its argument types.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default @Nullable <a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#deriveDecimalDivideType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)" class="member-name-link">deriveDecimalDivideType</a><wbr>(<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></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5">
<div class="block">Infers the return type of a decimal division.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default @Nullable <a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#deriveDecimalModType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)" class="member-name-link">deriveDecimalModType</a><wbr>(<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></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5">
<div class="block">Infers the return type of a decimal modulus operation.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default @Nullable <a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#deriveDecimalMultiplyType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)" class="member-name-link">deriveDecimalMultiplyType</a><wbr>(<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></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5">
<div class="block">Infers the return type of a decimal multiplication.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default @Nullable <a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#deriveDecimalPlusType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)" class="member-name-link">deriveDecimalPlusType</a><wbr>(<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></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5">
<div class="block">Infers the return type of a decimal addition.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#deriveFractionalRankType(org.apache.calcite.rel.type.RelDataTypeFactory)" class="member-name-link">deriveFractionalRankType</a><wbr>(<a href="RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns the return type of the <code>CUME_DIST</code> and <code>PERCENT_RANK</code>
aggregate functions.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#deriveRankType(org.apache.calcite.rel.type.RelDataTypeFactory)" class="member-name-link">deriveRankType</a><wbr>(<a href="RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<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>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#deriveSumType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType)" class="member-name-link">deriveSumType</a><wbr>(<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></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns the return type of a call to the <code>SUM</code> aggregate function,
inferred from its argument type.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default <a href="TimeFrameSet.html" title="class in org.apache.calcite.rel.type">TimeFrameSet</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#deriveTimeFrameSet(org.apache.calcite.rel.type.TimeFrameSet)" class="member-name-link">deriveTimeFrameSet</a><wbr>(<a href="TimeFrameSet.html" title="class in org.apache.calcite.rel.type">TimeFrameSet</a>&nbsp;frameSet)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5">
<div class="block">Returns a list of supported time frames.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getDefaultPrecision(org.apache.calcite.sql.type.SqlTypeName)" class="member-name-link">getDefaultPrecision</a><wbr>(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns default precision for this type if supported, otherwise -1 if
precision is either unsupported or must be specified explicitly.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>@Nullable <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getLiteral(org.apache.calcite.sql.type.SqlTypeName,boolean)" class="member-name-link">getLiteral</a><wbr>(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
boolean&nbsp;isPrefix)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns the LITERAL string for the type, either PREFIX/SUFFIX.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getMaxNumericPrecision()" class="member-name-link">getMaxNumericPrecision</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns the maximum precision of a NUMERIC or DECIMAL type.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getMaxNumericScale()" class="member-name-link">getMaxNumericScale</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns the maximum scale of a NUMERIC or DECIMAL type.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getMaxPrecision(org.apache.calcite.sql.type.SqlTypeName)" class="member-name-link">getMaxPrecision</a><wbr>(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<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>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getMaxScale(org.apache.calcite.sql.type.SqlTypeName)" class="member-name-link">getMaxScale</a><wbr>(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns the maximum scale of a given type.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getNumTypeRadix(org.apache.calcite.sql.type.SqlTypeName)" class="member-name-link">getNumTypeRadix</a><wbr>(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns the numeric type radix, typically 2 or 10.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#isAutoincrement(org.apache.calcite.sql.type.SqlTypeName)" class="member-name-link">isAutoincrement</a><wbr>(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns whether the type can be auto increment.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#isCaseSensitive(org.apache.calcite.sql.type.SqlTypeName)" class="member-name-link">isCaseSensitive</a><wbr>(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns whether the type is case sensitive.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#isSchemaCaseSensitive()" class="member-name-link">isSchemaCaseSensitive</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Whether two record types are considered distinct if their field names
are the same but in different cases.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#shouldConvertRaggedUnionTypesToVarying()" class="member-name-link">shouldConvertRaggedUnionTypesToVarying</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Whether the least restrictive type of a number of CHAR types of different
lengths should be a VARCHAR type.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#shouldUseDoubleMultiplication(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)" class="member-name-link">shouldUseDoubleMultiplication</a><wbr>(<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></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5">
<div class="block">Returns whether a decimal multiplication should be implemented by casting
arguments to double values.</div>
</div>
</div>
</div>
</div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ FIELD DETAIL =========== -->
<li>
<section class="field-details" id="field-detail">
<h2>Field Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="DEFAULT">
<h3>DEFAULT</h3>
<div class="member-signature"><span class="modifiers">static final</span>&nbsp;<span class="return-type"><a href="RelDataTypeSystem.html" title="interface in org.apache.calcite.rel.type">RelDataTypeSystem</a></span>&nbsp;<span class="element-name">DEFAULT</span></div>
<div class="block">Default type system.</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="getMaxScale(org.apache.calcite.sql.type.SqlTypeName)">
<h3>getMaxScale</h3>
<div class="member-signature"><span class="return-type">int</span>&nbsp;<span class="element-name">getMaxScale</span><wbr><span class="parameters">(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</span></div>
<div class="block">Returns the maximum scale of a given type.</div>
</section>
</li>
<li>
<section class="detail" id="getDefaultPrecision(org.apache.calcite.sql.type.SqlTypeName)">
<h3>getDefaultPrecision</h3>
<div class="member-signature"><span class="return-type">int</span>&nbsp;<span class="element-name">getDefaultPrecision</span><wbr><span class="parameters">(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</span></div>
<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 class="notes">
<dt>Returns:</dt>
<dd>Default precision</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getMaxPrecision(org.apache.calcite.sql.type.SqlTypeName)">
<h3>getMaxPrecision</h3>
<div class="member-signature"><span class="return-type">int</span>&nbsp;<span class="element-name">getMaxPrecision</span><wbr><span class="parameters">(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</span></div>
<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 class="notes">
<dt>Returns:</dt>
<dd>Maximum allowed precision</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getMaxNumericScale()">
<h3>getMaxNumericScale</h3>
<div class="member-signature"><span class="return-type">int</span>&nbsp;<span class="element-name">getMaxNumericScale</span>()</div>
<div class="block">Returns the maximum scale of a NUMERIC or DECIMAL type.</div>
</section>
</li>
<li>
<section class="detail" id="getMaxNumericPrecision()">
<h3>getMaxNumericPrecision</h3>
<div class="member-signature"><span class="return-type">int</span>&nbsp;<span class="element-name">getMaxNumericPrecision</span>()</div>
<div class="block">Returns the maximum precision of a NUMERIC or DECIMAL type.</div>
</section>
</li>
<li>
<section class="detail" id="getLiteral(org.apache.calcite.sql.type.SqlTypeName,boolean)">
<h3>getLiteral</h3>
<div class="member-signature"><span class="return-type">@Nullable <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">getLiteral</span><wbr><span class="parameters">(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
boolean&nbsp;isPrefix)</span></div>
<div class="block">Returns the LITERAL string for the type, either PREFIX/SUFFIX.</div>
</section>
</li>
<li>
<section class="detail" id="isCaseSensitive(org.apache.calcite.sql.type.SqlTypeName)">
<h3>isCaseSensitive</h3>
<div class="member-signature"><span class="return-type">boolean</span>&nbsp;<span class="element-name">isCaseSensitive</span><wbr><span class="parameters">(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</span></div>
<div class="block">Returns whether the type is case sensitive.</div>
</section>
</li>
<li>
<section class="detail" id="isAutoincrement(org.apache.calcite.sql.type.SqlTypeName)">
<h3>isAutoincrement</h3>
<div class="member-signature"><span class="return-type">boolean</span>&nbsp;<span class="element-name">isAutoincrement</span><wbr><span class="parameters">(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</span></div>
<div class="block">Returns whether the type can be auto increment.</div>
</section>
</li>
<li>
<section class="detail" id="getNumTypeRadix(org.apache.calcite.sql.type.SqlTypeName)">
<h3>getNumTypeRadix</h3>
<div class="member-signature"><span class="return-type">int</span>&nbsp;<span class="element-name">getNumTypeRadix</span><wbr><span class="parameters">(<a href="../../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</span></div>
<div class="block">Returns the numeric type radix, typically 2 or 10.
0 means "not applicable".</div>
</section>
</li>
<li>
<section class="detail" id="deriveSumType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType)">
<h3>deriveSumType</h3>
<div class="member-signature"><span class="return-type"><a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></span>&nbsp;<span class="element-name">deriveSumType</span><wbr><span class="parameters">(<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)</span></div>
<div class="block">Returns the return type of a call to the <code>SUM</code> aggregate function,
inferred from its argument type.</div>
</section>
</li>
<li>
<section class="detail" id="deriveAvgAggType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType)">
<h3>deriveAvgAggType</h3>
<div class="member-signature"><span class="return-type"><a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></span>&nbsp;<span class="element-name">deriveAvgAggType</span><wbr><span class="parameters">(<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)</span></div>
<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>
</section>
</li>
<li>
<section class="detail" id="deriveCovarType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">
<h3>deriveCovarType</h3>
<div class="member-signature"><span class="return-type"><a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></span>&nbsp;<span class="element-name">deriveCovarType</span><wbr><span class="parameters">(<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)</span></div>
<div class="block">Returns the return type of a call to the <code>COVAR</code> aggregate function,
inferred from its argument types.</div>
</section>
</li>
<li>
<section class="detail" id="deriveFractionalRankType(org.apache.calcite.rel.type.RelDataTypeFactory)">
<h3>deriveFractionalRankType</h3>
<div class="member-signature"><span class="return-type"><a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></span>&nbsp;<span class="element-name">deriveFractionalRankType</span><wbr><span class="parameters">(<a href="RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory)</span></div>
<div class="block">Returns the return type of the <code>CUME_DIST</code> and <code>PERCENT_RANK</code>
aggregate functions.</div>
</section>
</li>
<li>
<section class="detail" id="deriveRankType(org.apache.calcite.rel.type.RelDataTypeFactory)">
<h3>deriveRankType</h3>
<div class="member-signature"><span class="return-type"><a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></span>&nbsp;<span class="element-name">deriveRankType</span><wbr><span class="parameters">(<a href="RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory)</span></div>
<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>
</section>
</li>
<li>
<section class="detail" id="isSchemaCaseSensitive()">
<h3>isSchemaCaseSensitive</h3>
<div class="member-signature"><span class="return-type">boolean</span>&nbsp;<span class="element-name">isSchemaCaseSensitive</span>()</div>
<div class="block">Whether two record types are considered distinct if their field names
are the same but in different cases.</div>
</section>
</li>
<li>
<section class="detail" id="shouldConvertRaggedUnionTypesToVarying()">
<h3>shouldConvertRaggedUnionTypesToVarying</h3>
<div class="member-signature"><span class="return-type">boolean</span>&nbsp;<span class="element-name">shouldConvertRaggedUnionTypesToVarying</span>()</div>
<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>
</section>
</li>
<li>
<section class="detail" id="shouldUseDoubleMultiplication(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">
<h3>shouldUseDoubleMultiplication</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">shouldUseDoubleMultiplication</span><wbr><span class="parameters">(<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)</span></div>
<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>
</section>
</li>
<li>
<section class="detail" id="deriveDecimalPlusType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">
<h3>deriveDecimalPlusType</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="return-type">@Nullable <a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></span>&nbsp;<span class="element-name">deriveDecimalPlusType</span><wbr><span class="parameters">(<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)</span></div>
<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 class="notes">
<dt>Parameters:</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>Returns:</dt>
<dd>Result type for a decimal addition</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="../../util/Glossary.html#SQL2003"><code>SQL:2003 Part 2 Section 6.26</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="deriveDecimalMultiplyType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">
<h3>deriveDecimalMultiplyType</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="return-type">@Nullable <a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></span>&nbsp;<span class="element-name">deriveDecimalMultiplyType</span><wbr><span class="parameters">(<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)</span></div>
<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 class="notes">
<dt>Parameters:</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>Returns:</dt>
<dd>Result type for a decimal multiplication, or null if decimal
multiplication should not be applied to the operands</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="../../util/Glossary.html#SQL2003"><code>SQL:2003 Part 2 Section 6.26</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="deriveDecimalDivideType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">
<h3>deriveDecimalDivideType</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="return-type">@Nullable <a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></span>&nbsp;<span class="element-name">deriveDecimalDivideType</span><wbr><span class="parameters">(<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)</span></div>
<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 class="notes">
<dt>Parameters:</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>Returns:</dt>
<dd>Result type for a decimal division, or null if decimal
division should not be applied to the operands</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="../../util/Glossary.html#SQL2003"><code>SQL:2003 Part 2 Section 6.26</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="deriveDecimalModType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">
<h3>deriveDecimalModType</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="return-type">@Nullable <a href="RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></span>&nbsp;<span class="element-name">deriveDecimalModType</span><wbr><span class="parameters">(<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)</span></div>
<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 class="notes">
<dt>Parameters:</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>Returns:</dt>
<dd>Result type for a decimal modulus, or null if decimal
modulus should not be applied to the operands</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="../../util/Glossary.html#SQL2003"><code>SQL:2003 Part 2 Section 6.27
<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 = min(p1 - s1, p2 - s2) + max(s1, s2)</li>
</ul>
</li>
<li>p and s are capped at their maximum values</li>
</ul></code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="deriveTimeFrameSet(org.apache.calcite.rel.type.TimeFrameSet)">
<h3>deriveTimeFrameSet</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="return-type"><a href="TimeFrameSet.html" title="class in org.apache.calcite.rel.type">TimeFrameSet</a></span>&nbsp;<span class="element-name">deriveTimeFrameSet</span><wbr><span class="parameters">(<a href="TimeFrameSet.html" title="class in org.apache.calcite.rel.type">TimeFrameSet</a>&nbsp;frameSet)</span></div>
<div class="block">Returns a list of supported time frames.
<p>The validator calls this method with <a href="TimeFrames.html#CORE"><code>TimeFrames.CORE</code></a> as an
argument, and the default implementation of this method returns its input,
and therefore <a href="TimeFrames.html#CORE"><code>CORE</code></a> is the default time frame set.
<p>If you wish to use a custom time frame set, create an instance of
<code>RelDataTypeSystem</code> that overrides this method. Your method should
call <a href="TimeFrameSet.html#builder()"><code>TimeFrameSet.builder()</code></a>, will probably add all or most of the
time frames in the <code>frameSet</code> argument, and then call
<a href="TimeFrameSet.Builder.html#build()"><code>TimeFrameSet.Builder.build()</code></a>.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>frameSet</code> - Set of built-in time frames</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &copy; 2012-2023 Apache Software Foundation. All Rights Reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>