blob: c4be4c24bedc4550d25ee71656c888607c300fb7 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>SqlTypeUtil (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="SqlTypeUtil (Apache Calcite API)";
}
}
catch(err) {
}
//-->
var data = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":41,"i28":41,"i29":9,"i30":9,"i31":9,"i32":9,"i33":9,"i34":9,"i35":9,"i36":9,"i37":9,"i38":9,"i39":9,"i40":9,"i41":9,"i42":9,"i43":9,"i44":9,"i45":9,"i46":9,"i47":9,"i48":9,"i49":9,"i50":9,"i51":9,"i52":9,"i53":9,"i54":9,"i55":9,"i56":9,"i57":41,"i58":9,"i59":9,"i60":9,"i61":9,"i62":9,"i63":9,"i64":9,"i65":9,"i66":9,"i67":9,"i68":9,"i69":9,"i70":9,"i71":9,"i72":9,"i73":9,"i74":9,"i75":9,"i76":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated 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/SqlTypeUtil.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>Nested&nbsp;|&nbsp;</li>
<li>Field&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>Field&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.sql.type</a></div>
<h2 title="Class SqlTypeUtil" class="title">Class SqlTypeUtil</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.calcite.sql.type.SqlTypeUtil</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public abstract class <span class="typeNameLabel">SqlTypeUtil</span>
extends java.lang.Object</pre>
<div class="block">Contains utility methods used during SQL validation or type derivation.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== 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()">SqlTypeUtil</a></span>()</code></th>
<td class="colLast">&nbsp;</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="t1" class="tableTab"><span><a href="javascript:show(1);">Static 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><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated 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>static <a href="../../rel/type/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="#addCharsetAndCollation(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataTypeFactory)">addCharsetAndCollation</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type,
<a href="../../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory)</code></th>
<td class="colLast">
<div class="block">Adds collation and charset to a character type, returns other types
unchanged.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#allNullable(java.util.List)">allNullable</a></span>&#8203;(java.util.List&lt;<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&gt;&nbsp;types)</code></th>
<td class="colLast">
<div class="block">Returns whether all of array of types are nullable.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#areCharacterSetsMismatched(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">areCharacterSetsMismatched</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;t1,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;t2)</code></th>
<td class="colLast">
<div class="block">Determines whether two types both have different character sets.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#areSameFamily(java.lang.Iterable)">areSameFamily</a></span>&#8203;(java.lang.Iterable&lt;<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&gt;&nbsp;types)</code></th>
<td class="colLast">
<div class="block">Returns whether all types in a collection have the same family, as
determined by <a href="#isSameFamily(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)"><code>isSameFamily(RelDataType, RelDataType)</code></a>.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#canAssignFrom(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">canAssignFrom</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;toType,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;fromType)</code></th>
<td class="colLast">
<div class="block">Tests whether a value can be assigned to a site.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#canCastFrom(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType,boolean)">canCastFrom</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;toType,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;fromType,
boolean&nbsp;coerce)</code></th>
<td class="colLast">
<div class="block">Compares two types and returns true if fromType can be cast to toType.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>private static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#canConvertStringInCompare(org.apache.calcite.rel.type.RelDataTypeFamily)">canConvertStringInCompare</a></span>&#8203;(<a href="../../rel/type/RelDataTypeFamily.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFamily</a>&nbsp;family)</code></th>
<td class="colLast">
<div class="block">Returns whether a character data type can be implicitly converted to a
given family in a compare operation.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#comparePrecision(int,int)">comparePrecision</a></span>&#8203;(int&nbsp;p0,
int&nbsp;p1)</code></th>
<td class="colLast">
<div class="block">Returns whether a precision is greater or equal than another,
treating <a href="../../rel/type/RelDataType.html#PRECISION_NOT_SPECIFIED"><code>RelDataType.PRECISION_NOT_SPECIFIED</code></a> as infinity.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#containsNullable(java.util.List)">containsNullable</a></span>&#8203;(java.util.List&lt;<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&gt;&nbsp;types)</code></th>
<td class="colLast">
<div class="block">Returns whether one or more of an array of types is nullable.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#containsNullable(org.apache.calcite.rel.type.RelDataType)">containsNullable</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">
<div class="block">Determines whether a type or any of its fields (if a structured type) are
nullable.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static <a href="../SqlDataTypeSpec.html" title="class in org.apache.calcite.sql">SqlDataTypeSpec</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#convertTypeToSpec(org.apache.calcite.rel.type.RelDataType)">convertTypeToSpec</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">
<div class="block">Converts an instance of RelDataType to an instance of SqlDataTypeSpec.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static <a href="../SqlDataTypeSpec.html" title="class in org.apache.calcite.sql">SqlDataTypeSpec</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#convertTypeToSpec(org.apache.calcite.rel.type.RelDataType,java.lang.String,int)">convertTypeToSpec</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type,
java.lang.String&nbsp;charSetName,
int&nbsp;maxPrecision)</code></th>
<td class="colLast">
<div class="block">Converts an instance of RelDataType to an instance of SqlDataTypeSpec.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static <a href="../../rel/type/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="#createArrayType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,boolean)">createArrayType</a></span>&#8203;(<a href="../../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type,
boolean&nbsp;nullable)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>static <a href="../../rel/type/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="#createEmptyStructType(org.apache.calcite.rel.type.RelDataTypeFactory)">createEmptyStructType</a></span>&#8203;(<a href="../../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory)</code></th>
<td class="colLast">
<div class="block">Records a struct type with no fields.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>static <a href="../../rel/type/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="#createMapType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType,boolean)">createMapType</a></span>&#8203;(<a href="../../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;keyType,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;valueType,
boolean&nbsp;nullable)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>static <a href="../../rel/type/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="#createMultisetType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,boolean)">createMultisetType</a></span>&#8203;(<a href="../../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type,
boolean&nbsp;nullable)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>static java.util.List&lt;<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#deriveAndCollectTypes(org.apache.calcite.sql.validate.SqlValidator,org.apache.calcite.sql.validate.SqlValidatorScope,java.util.List)">deriveAndCollectTypes</a></span>&#8203;(<a href="../validate/SqlValidator.html" title="interface in org.apache.calcite.sql.validate">SqlValidator</a>&nbsp;validator,
<a href="../validate/SqlValidatorScope.html" title="interface in org.apache.calcite.sql.validate">SqlValidatorScope</a>&nbsp;scope,
java.util.List&lt;<a href="../SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&gt;&nbsp;operands)</code></th>
<td class="colLast">
<div class="block">Iterates over all operands, derives their types, and collects them into
a list.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#equalAsStructSansNullability(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.sql.validate.SqlNameMatcher)">equalAsStructSansNullability</a></span>&#8203;(<a href="../../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;factory,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type1,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type2,
<a href="../validate/SqlNameMatcher.html" title="interface in org.apache.calcite.sql.validate">SqlNameMatcher</a>&nbsp;nameMatcher)</code></th>
<td class="colLast">
<div class="block">Returns whether two struct types are equal, ignoring nullability.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#equalSansNullability(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">equalSansNullability</a></span>&#8203;(<a href="../../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;factory,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type1,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type2)</code></th>
<td class="colLast">
<div class="block">Returns whether two types are equal, ignoring nullability.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>protected static <a href="../../rel/type/RelDataTypeFamily.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFamily</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#family(org.apache.calcite.rel.type.RelDataType)">family</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#findField(org.apache.calcite.rel.type.RelDataType,java.lang.String)">findField</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type,
java.lang.String&nbsp;fieldName)</code></th>
<td class="colLast">
<div class="block">Returns the ordinal of a given field in a record type, or -1 if the field
is not found.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>private static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#flattenFields(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,java.util.List,int%5B%5D)">flattenFields</a></span>&#8203;(<a href="../../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type,
java.util.List&lt;<a href="../../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;list,
int[]&nbsp;flatteningMap)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>static <a href="../../rel/type/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="#flattenRecordType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,int%5B%5D)">flattenRecordType</a></span>&#8203;(<a href="../../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;recordType,
int[]&nbsp;flatteningMap)</code></th>
<td class="colLast">
<div class="block">Flattens a record type by recursively expanding any fields which are
themselves record types.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMaxByteSize(org.apache.calcite.rel.type.RelDataType)">getMaxByteSize</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">
<div class="block">Computes the maximum number of bytes required to represent a value of a
type having user-defined precision.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>static <a href="../../rel/type/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="#getMaxPrecisionScaleDecimal(org.apache.calcite.rel.type.RelDataTypeFactory)">getMaxPrecisionScaleDecimal</a></span>&#8203;(<a href="../../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;factory)</code></th>
<td class="colLast">
<div class="block">Get decimal with max precision/scale for the current type system.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMaxValue(org.apache.calcite.rel.type.RelDataType)">getMaxValue</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">
<div class="block">Determines the maximum unscaled value of a numeric type</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMinValue(org.apache.calcite.rel.type.RelDataType)">getMinValue</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">
<div class="block">Determines the minimum unscaled value of a numeric type</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getNumericJavaClassName(org.apache.calcite.rel.type.RelDataType)">getNumericJavaClassName</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span></div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPrimitiveWrapperJavaClassName(org.apache.calcite.rel.type.RelDataType)">getPrimitiveWrapperJavaClassName</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span></div>
</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasCharactor(org.apache.calcite.rel.type.RelDataType)">hasCharactor</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasScale(org.apache.calcite.rel.type.RelDataType)">hasScale</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">
<div class="block">Returns whether a type's scale is set.</div>
</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#inBooleanFamily(org.apache.calcite.rel.type.RelDataType)">inBooleanFamily</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i32" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#inCharFamily(org.apache.calcite.rel.type.RelDataType)">inCharFamily</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#inCharFamily(org.apache.calcite.sql.type.SqlTypeName)">inCharFamily</a></span>&#8203;(<a href="SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#inCharOrBinaryFamilies(org.apache.calcite.rel.type.RelDataType)">inCharOrBinaryFamilies</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i35" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#inSameFamily(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">inSameFamily</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;t1,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;t2)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i36" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#inSameFamilyOrNull(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">inSameFamilyOrNull</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;t1,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;t2)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i37" class="rowColor">
<td class="colFirst"><code>private static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isAny(org.apache.calcite.rel.type.RelDataType)">isAny</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;t)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i38" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isApproximateNumeric(org.apache.calcite.rel.type.RelDataType)">isApproximateNumeric</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i39" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isArray(org.apache.calcite.rel.type.RelDataType)">isArray</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i40" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isAtomic(org.apache.calcite.rel.type.RelDataType)">isAtomic</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i41" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isBigint(org.apache.calcite.rel.type.RelDataType)">isBigint</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i42" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isBinary(org.apache.calcite.rel.type.RelDataType)">isBinary</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i43" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isBoolean(org.apache.calcite.rel.type.RelDataType)">isBoolean</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i44" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isBoundedVariableWidth(org.apache.calcite.rel.type.RelDataType)">isBoundedVariableWidth</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i45" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isCharacter(org.apache.calcite.rel.type.RelDataType)">isCharacter</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i46" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isCharTypeComparable(java.util.List)">isCharTypeComparable</a></span>&#8203;(java.util.List&lt;<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&gt;&nbsp;argTypes)</code></th>
<td class="colLast">
<div class="block">Checks whether two types or more are char comparable.</div>
</td>
</tr>
<tr id="i47" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isCharTypeComparable(org.apache.calcite.sql.SqlCallBinding,java.util.List,boolean)">isCharTypeComparable</a></span>&#8203;(<a href="../SqlCallBinding.html" title="class in org.apache.calcite.sql">SqlCallBinding</a>&nbsp;binding,
java.util.List&lt;<a href="../SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&gt;&nbsp;operands,
boolean&nbsp;throwOnFailure)</code></th>
<td class="colLast">
<div class="block">Returns whether the operands to a call are char type-comparable.</div>
</td>
</tr>
<tr id="i48" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isComparable(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">isComparable</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type1,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type2)</code></th>
<td class="colLast">
<div class="block">Returns whether two types are comparable.</div>
</td>
</tr>
<tr id="i49" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isDate(org.apache.calcite.rel.type.RelDataType)">isDate</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i50" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isDatetime(org.apache.calcite.rel.type.RelDataType)">isDatetime</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i51" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isDecimal(org.apache.calcite.rel.type.RelDataType)">isDecimal</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i52" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isDouble(org.apache.calcite.rel.type.RelDataType)">isDouble</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i53" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isExactNumeric(org.apache.calcite.rel.type.RelDataType)">isExactNumeric</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i54" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isFlat(org.apache.calcite.rel.type.RelDataType)">isFlat</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">
<div class="block">Returns whether a type is flat.</div>
</td>
</tr>
<tr id="i55" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isInterval(org.apache.calcite.rel.type.RelDataType)">isInterval</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i56" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isIntType(org.apache.calcite.rel.type.RelDataType)">isIntType</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i57" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isJavaPrimitive(org.apache.calcite.rel.type.RelDataType)">isJavaPrimitive</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span></div>
</td>
</tr>
<tr id="i58" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isLob(org.apache.calcite.rel.type.RelDataType)">isLob</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i59" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isMap(org.apache.calcite.rel.type.RelDataType)">isMap</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i60" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isNull(org.apache.calcite.rel.type.RelDataType)">isNull</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i61" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isNumeric(org.apache.calcite.rel.type.RelDataType)">isNumeric</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i62" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isOfSameTypeName(java.util.Collection,org.apache.calcite.rel.type.RelDataType)">isOfSameTypeName</a></span>&#8203;(java.util.Collection&lt;<a href="SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&gt;&nbsp;typeNames,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">
<div class="block">Returns true if any element in <code>typeNames</code> matches
type.getSqlTypeName().</div>
</td>
</tr>
<tr id="i63" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isOfSameTypeName(org.apache.calcite.sql.type.SqlTypeName,org.apache.calcite.rel.type.RelDataType)">isOfSameTypeName</a></span>&#8203;(<a href="SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">
<div class="block">Returns typeName.equals(type.getSqlTypeName()).</div>
</td>
</tr>
<tr id="i64" class="altColor">
<td class="colFirst"><code>private static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isSameFamily(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">isSameFamily</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type1,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type2)</code></th>
<td class="colLast">
<div class="block">Returns whether two types are scalar types of the same family, or struct types whose fields
are pairwise of the same family.</div>
</td>
</tr>
<tr id="i65" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isString(org.apache.calcite.rel.type.RelDataType)">isString</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i66" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isTimestamp(org.apache.calcite.rel.type.RelDataType)">isTimestamp</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i67" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isUnicode(org.apache.calcite.rel.type.RelDataType)">isUnicode</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">
<div class="block">Checks whether a type represents Unicode character data.</div>
</td>
</tr>
<tr id="i68" class="altColor">
<td class="colFirst"><code>static <a href="../../rel/type/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="#leastRestrictiveForComparison(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">leastRestrictiveForComparison</a></span>&#8203;(<a href="../../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type1,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type2)</code></th>
<td class="colLast">
<div class="block">Returns the least restrictive type T, such that a value of type T can be
compared with values of type <code>type0</code> and <code>type1</code> using
<code>=</code>.</div>
</td>
</tr>
<tr id="i69" class="rowColor">
<td class="colFirst"><code>static <a href="../../rel/type/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="#makeNullableIfOperandsAre(org.apache.calcite.rel.type.RelDataTypeFactory,java.util.List,org.apache.calcite.rel.type.RelDataType)">makeNullableIfOperandsAre</a></span>&#8203;(<a href="../../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
java.util.List&lt;<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&gt;&nbsp;argTypes,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">
<div class="block">Recreates a given RelDataType with nullability iff any of the param
argTypes are nullable.</div>
</td>
</tr>
<tr id="i70" class="altColor">
<td class="colFirst"><code>static <a href="../../rel/type/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="#makeNullableIfOperandsAre(org.apache.calcite.sql.validate.SqlValidator,org.apache.calcite.sql.validate.SqlValidatorScope,org.apache.calcite.sql.SqlCall,org.apache.calcite.rel.type.RelDataType)">makeNullableIfOperandsAre</a></span>&#8203;(<a href="../validate/SqlValidator.html" title="interface in org.apache.calcite.sql.validate">SqlValidator</a>&nbsp;validator,
<a href="../validate/SqlValidatorScope.html" title="interface in org.apache.calcite.sql.validate">SqlValidatorScope</a>&nbsp;scope,
<a href="../SqlCall.html" title="class in org.apache.calcite.sql">SqlCall</a>&nbsp;call,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">
<div class="block">Recreates a given RelDataType with nullability iff any of the operands
of a call are nullable.</div>
</td>
</tr>
<tr id="i71" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#maxPrecision(int,int)">maxPrecision</a></span>&#8203;(int&nbsp;p0,
int&nbsp;p1)</code></th>
<td class="colLast">
<div class="block">Returns the larger of two precisions, treating
<a href="../../rel/type/RelDataType.html#PRECISION_NOT_SPECIFIED"><code>RelDataType.PRECISION_NOT_SPECIFIED</code></a> as infinity.</div>
</td>
</tr>
<tr id="i72" class="altColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#maxValue(org.apache.calcite.rel.type.RelDataType)">maxValue</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></th>
<td class="colLast">
<div class="block">Returns the maximum value of an integral type, as a long value</div>
</td>
</tr>
<tr id="i73" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#needsNullIndicator(org.apache.calcite.rel.type.RelDataType)">needsNullIndicator</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;recordType)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i74" class="altColor">
<td class="colFirst"><code>static java.util.List&lt;<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#projectTypes(org.apache.calcite.rel.type.RelDataType,java.util.List)">projectTypes</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;rowType,
java.util.List&lt;? extends java.lang.Number&gt;&nbsp;requiredFields)</code></th>
<td class="colLast">
<div class="block">Selects data types of the specified fields from an input row type.</div>
</td>
</tr>
<tr id="i75" class="rowColor">
<td class="colFirst"><code>static <a href="../../rel/type/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="#promoteToRowType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,java.lang.String)">promoteToRowType</a></span>&#8203;(<a href="../../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type,
java.lang.String&nbsp;fieldName)</code></th>
<td class="colLast">
<div class="block">Promotes a type to a row type (does nothing if it already is one).</div>
</td>
</tr>
<tr id="i76" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sameNamedType(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">sameNamedType</a></span>&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;t1,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;t2)</code></th>
<td class="colLast">
<div class="block">Tests whether two types have the same name and structure, possibly with
differing modifiers.</div>
</td>
</tr>
</table>
<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, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= 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;()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>SqlTypeUtil</h4>
<pre>public&nbsp;SqlTypeUtil()</pre>
</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="isCharTypeComparable(java.util.List)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isCharTypeComparable</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isCharTypeComparable&#8203;(java.util.List&lt;<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&gt;&nbsp;argTypes)</pre>
<div class="block">Checks whether two types or more are char comparable.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Returns true if all operands are of char type and if they are
comparable, i.e. of the same charset and collation of same charset</dd>
</dl>
</li>
</ul>
<a id="isCharTypeComparable(org.apache.calcite.sql.SqlCallBinding,java.util.List,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isCharTypeComparable</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isCharTypeComparable&#8203;(<a href="../SqlCallBinding.html" title="class in org.apache.calcite.sql">SqlCallBinding</a>&nbsp;binding,
java.util.List&lt;<a href="../SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&gt;&nbsp;operands,
boolean&nbsp;throwOnFailure)</pre>
<div class="block">Returns whether the operands to a call are char type-comparable.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>binding</code> - Binding of call to operands</dd>
<dd><code>operands</code> - Operands to check for compatibility; usually the
operands of the bound call, but not always</dd>
<dd><code>throwOnFailure</code> - Whether to throw an exception on failure</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether operands are valid</dd>
</dl>
</li>
</ul>
<a id="deriveAndCollectTypes(org.apache.calcite.sql.validate.SqlValidator,org.apache.calcite.sql.validate.SqlValidatorScope,java.util.List)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deriveAndCollectTypes</h4>
<pre class="methodSignature">public static&nbsp;java.util.List&lt;<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&gt;&nbsp;deriveAndCollectTypes&#8203;(<a href="../validate/SqlValidator.html" title="interface in org.apache.calcite.sql.validate">SqlValidator</a>&nbsp;validator,
<a href="../validate/SqlValidatorScope.html" title="interface in org.apache.calcite.sql.validate">SqlValidatorScope</a>&nbsp;scope,
java.util.List&lt;<a href="../SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&gt;&nbsp;operands)</pre>
<div class="block">Iterates over all operands, derives their types, and collects them into
a list.</div>
</li>
</ul>
<a id="promoteToRowType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>promoteToRowType</h4>
<pre class="methodSignature">public static&nbsp;<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;promoteToRowType&#8203;(<a href="../../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type,
java.lang.String&nbsp;fieldName)</pre>
<div class="block">Promotes a type to a row type (does nothing if it already is one).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type</code> - type to be promoted</dd>
<dd><code>fieldName</code> - name to give field in row type; null for default of
"ROW_VALUE"</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>row type</dd>
</dl>
</li>
</ul>
<a id="makeNullableIfOperandsAre(org.apache.calcite.sql.validate.SqlValidator,org.apache.calcite.sql.validate.SqlValidatorScope,org.apache.calcite.sql.SqlCall,org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>makeNullableIfOperandsAre</h4>
<pre class="methodSignature">public static&nbsp;<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;makeNullableIfOperandsAre&#8203;(<a href="../validate/SqlValidator.html" title="interface in org.apache.calcite.sql.validate">SqlValidator</a>&nbsp;validator,
<a href="../validate/SqlValidatorScope.html" title="interface in org.apache.calcite.sql.validate">SqlValidatorScope</a>&nbsp;scope,
<a href="../SqlCall.html" title="class in org.apache.calcite.sql">SqlCall</a>&nbsp;call,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<div class="block">Recreates a given RelDataType with nullability iff any of the operands
of a call are nullable.</div>
</li>
</ul>
<a id="makeNullableIfOperandsAre(org.apache.calcite.rel.type.RelDataTypeFactory,java.util.List,org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>makeNullableIfOperandsAre</h4>
<pre class="methodSignature">public static&nbsp;<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;makeNullableIfOperandsAre&#8203;(<a href="../../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
java.util.List&lt;<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&gt;&nbsp;argTypes,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<div class="block">Recreates a given RelDataType with nullability iff any of the param
argTypes are nullable.</div>
</li>
</ul>
<a id="allNullable(java.util.List)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>allNullable</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;allNullable&#8203;(java.util.List&lt;<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&gt;&nbsp;types)</pre>
<div class="block">Returns whether all of array of types are nullable.</div>
</li>
</ul>
<a id="containsNullable(java.util.List)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>containsNullable</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;containsNullable&#8203;(java.util.List&lt;<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&gt;&nbsp;types)</pre>
<div class="block">Returns whether one or more of an array of types is nullable.</div>
</li>
</ul>
<a id="containsNullable(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>containsNullable</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;containsNullable&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<div class="block">Determines whether a type or any of its fields (if a structured type) are
nullable.</div>
</li>
</ul>
<a id="isOfSameTypeName(org.apache.calcite.sql.type.SqlTypeName,org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isOfSameTypeName</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isOfSameTypeName&#8203;(<a href="SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<div class="block">Returns typeName.equals(type.getSqlTypeName()). If
typeName.equals(SqlTypeName.Any) true is always returned.</div>
</li>
</ul>
<a id="isOfSameTypeName(java.util.Collection,org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isOfSameTypeName</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isOfSameTypeName&#8203;(java.util.Collection&lt;<a href="SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&gt;&nbsp;typeNames,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<div class="block">Returns true if any element in <code>typeNames</code> matches
type.getSqlTypeName().</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#isOfSameTypeName(org.apache.calcite.sql.type.SqlTypeName,org.apache.calcite.rel.type.RelDataType)"><code>isOfSameTypeName(SqlTypeName, RelDataType)</code></a></dd>
</dl>
</li>
</ul>
<a id="isDatetime(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isDatetime</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isDatetime&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if type is DATE, TIME, or TIMESTAMP</dd>
</dl>
</li>
</ul>
<a id="isDate(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isDate</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isDate&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if type is DATE</dd>
</dl>
</li>
</ul>
<a id="isTimestamp(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isTimestamp</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isTimestamp&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if type is TIMESTAMP</dd>
</dl>
</li>
</ul>
<a id="isInterval(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isInterval</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isInterval&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if type is some kind of INTERVAL</dd>
</dl>
</li>
</ul>
<a id="inCharFamily(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>inCharFamily</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;inCharFamily&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if type is in SqlTypeFamily.Character</dd>
</dl>
</li>
</ul>
<a id="inCharFamily(org.apache.calcite.sql.type.SqlTypeName)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>inCharFamily</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;inCharFamily&#8203;(<a href="SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if type is in SqlTypeFamily.Character</dd>
</dl>
</li>
</ul>
<a id="inBooleanFamily(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>inBooleanFamily</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;inBooleanFamily&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if type is in SqlTypeFamily.Boolean</dd>
</dl>
</li>
</ul>
<a id="inSameFamily(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>inSameFamily</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;inSameFamily&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;t1,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;t2)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if two types are in same type family</dd>
</dl>
</li>
</ul>
<a id="inSameFamilyOrNull(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>inSameFamilyOrNull</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;inSameFamilyOrNull&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;t1,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;t2)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if two types are in same type family, or one or the other is
of type <a href="SqlTypeName.html#NULL"><code>SqlTypeName.NULL</code></a>.</dd>
</dl>
</li>
</ul>
<a id="inCharOrBinaryFamilies(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>inCharOrBinaryFamilies</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;inCharOrBinaryFamilies&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if type family is either character or binary</dd>
</dl>
</li>
</ul>
<a id="isLob(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isLob</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isLob&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if type is a LOB of some kind</dd>
</dl>
</li>
</ul>
<a id="isBoundedVariableWidth(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isBoundedVariableWidth</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isBoundedVariableWidth&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if type is variable width with bounded precision</dd>
</dl>
</li>
</ul>
<a id="isIntType(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isIntType</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isIntType&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if type is one of the integer types</dd>
</dl>
</li>
</ul>
<a id="isDecimal(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isDecimal</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isDecimal&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if type is decimal</dd>
</dl>
</li>
</ul>
<a id="isDouble(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isDouble</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isDouble&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if type is double</dd>
</dl>
</li>
</ul>
<a id="isBigint(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isBigint</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isBigint&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if type is bigint</dd>
</dl>
</li>
</ul>
<a id="isExactNumeric(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isExactNumeric</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isExactNumeric&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if type is numeric with exact precision</dd>
</dl>
</li>
</ul>
<a id="hasScale(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasScale</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;hasScale&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<div class="block">Returns whether a type's scale is set.</div>
</li>
</ul>
<a id="maxValue(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>maxValue</h4>
<pre class="methodSignature">public static&nbsp;long&nbsp;maxValue&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<div class="block">Returns the maximum value of an integral type, as a long value</div>
</li>
</ul>
<a id="isApproximateNumeric(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isApproximateNumeric</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isApproximateNumeric&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if type is numeric with approximate precision</dd>
</dl>
</li>
</ul>
<a id="isNumeric(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isNumeric</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isNumeric&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if type is numeric</dd>
</dl>
</li>
</ul>
<a id="isNull(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isNull</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isNull&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if type is null.</dd>
</dl>
</li>
</ul>
<a id="sameNamedType(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sameNamedType</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;sameNamedType&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;t1,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;t2)</pre>
<div class="block">Tests whether two types have the same name and structure, possibly with
differing modifiers. For example, VARCHAR(1) and VARCHAR(10) are
considered the same, while VARCHAR(1) and CHAR(1) are considered
different. Likewise, VARCHAR(1) MULTISET and VARCHAR(10) MULTISET are
considered the same.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if types have same name and structure</dd>
</dl>
</li>
</ul>
<a id="getMaxByteSize(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxByteSize</h4>
<pre class="methodSignature">public static&nbsp;int&nbsp;getMaxByteSize&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<div class="block">Computes the maximum number of bytes required to represent a value of a
type having user-defined precision. This computation assumes no overhead
such as length indicators and NUL-terminators. Complex types for which
multiple representations are possible (e.g. DECIMAL or TIMESTAMP) return
0.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type</code> - type for which to compute storage</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>maximum bytes, or 0 for a fixed-width type or type with unknown
maximum</dd>
</dl>
</li>
</ul>
<a id="getMinValue(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMinValue</h4>
<pre class="methodSignature">public static&nbsp;long&nbsp;getMinValue&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<div class="block">Determines the minimum unscaled value of a numeric type</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type</code> - a numeric type</dd>
</dl>
</li>
</ul>
<a id="getMaxValue(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxValue</h4>
<pre class="methodSignature">public static&nbsp;long&nbsp;getMaxValue&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<div class="block">Determines the maximum unscaled value of a numeric type</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type</code> - a numeric type</dd>
</dl>
</li>
</ul>
<a id="isJavaPrimitive(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isJavaPrimitive</h4>
<pre class="methodSignature">@Deprecated
public static&nbsp;boolean&nbsp;isJavaPrimitive&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if type has a representation as a Java primitive (ignoring
nullability)</dd>
</dl>
</li>
</ul>
<a id="getPrimitiveWrapperJavaClassName(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPrimitiveWrapperJavaClassName</h4>
<pre class="methodSignature">@Deprecated
public static&nbsp;java.lang.String&nbsp;getPrimitiveWrapperJavaClassName&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>class name of the wrapper for the primitive data type.</dd>
</dl>
</li>
</ul>
<a id="getNumericJavaClassName(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNumericJavaClassName</h4>
<pre class="methodSignature">@Deprecated
public static&nbsp;java.lang.String&nbsp;getNumericJavaClassName&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>class name of the numeric data type.</dd>
</dl>
</li>
</ul>
<a id="isAny(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isAny</h4>
<pre class="methodSignature">private static&nbsp;boolean&nbsp;isAny&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;t)</pre>
</li>
</ul>
<a id="canAssignFrom(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>canAssignFrom</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;canAssignFrom&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;toType,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;fromType)</pre>
<div class="block">Tests whether a value can be assigned to a site.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>toType</code> - type of the target site</dd>
<dd><code>fromType</code> - type of the source value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true iff assignable</dd>
</dl>
</li>
</ul>
<a id="areCharacterSetsMismatched(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>areCharacterSetsMismatched</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;areCharacterSetsMismatched&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;t1,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;t2)</pre>
<div class="block">Determines whether two types both have different character sets. If one
or the other type has no character set (e.g. in cast from INT to
VARCHAR), that is not a mismatch.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>t1</code> - first type</dd>
<dd><code>t2</code> - second type</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true iff mismatched</dd>
</dl>
</li>
</ul>
<a id="canCastFrom(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>canCastFrom</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;canCastFrom&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;toType,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;fromType,
boolean&nbsp;coerce)</pre>
<div class="block">Compares two types and returns true if fromType can be cast to toType.
<p>REVIEW jvs 17-Dec-2004: the coerce param below shouldn't really be
necessary. We're using it as a hack because
<a href="SqlTypeFactoryImpl.html#leastRestrictiveSqlType(java.util.List)"><code>SqlTypeFactoryImpl.leastRestrictiveSqlType(java.util.List&lt;org.apache.calcite.rel.type.RelDataType&gt;)</code></a> isn't complete enough
yet. Once it is, this param (and the non-coerce rules of
<a href="SqlTypeAssignmentRules.html" title="class in org.apache.calcite.sql.type"><code>SqlTypeAssignmentRules</code></a>) should go away.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>toType</code> - target of assignment</dd>
<dd><code>fromType</code> - source of assignment</dd>
<dd><code>coerce</code> - if true, the SQL rules for CAST are used; if false, the
rules are similar to Java; e.g. you can't assign short x =
(int) y, and you can't assign int x = (String) z.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true iff cast is legal</dd>
</dl>
</li>
</ul>
<a id="flattenRecordType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,int[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>flattenRecordType</h4>
<pre class="methodSignature">public static&nbsp;<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;flattenRecordType&#8203;(<a href="../../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;recordType,
int[]&nbsp;flatteningMap)</pre>
<div class="block">Flattens a record type by recursively expanding any fields which are
themselves record types. For each record type, a representative null
value field is also prepended (with state NULL for a null value and FALSE
for non-null), and all component types are asserted to be nullable, since
SQL doesn't allow NOT NULL to be specified on attributes.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>typeFactory</code> - factory which should produced flattened type</dd>
<dd><code>recordType</code> - type with possible nesting</dd>
<dd><code>flatteningMap</code> - if non-null, receives map from unflattened ordinal
to flattened ordinal (must have length at least
recordType.getFieldList().size())</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>flattened equivalent</dd>
</dl>
</li>
</ul>
<a id="needsNullIndicator(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>needsNullIndicator</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;needsNullIndicator&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;recordType)</pre>
</li>
</ul>
<a id="flattenFields(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,java.util.List,int[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>flattenFields</h4>
<pre class="methodSignature">private static&nbsp;boolean&nbsp;flattenFields&#8203;(<a href="../../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type,
java.util.List&lt;<a href="../../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;list,
int[]&nbsp;flatteningMap)</pre>
</li>
</ul>
<a id="convertTypeToSpec(org.apache.calcite.rel.type.RelDataType,java.lang.String,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertTypeToSpec</h4>
<pre class="methodSignature">public static&nbsp;<a href="../SqlDataTypeSpec.html" title="class in org.apache.calcite.sql">SqlDataTypeSpec</a>&nbsp;convertTypeToSpec&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type,
java.lang.String&nbsp;charSetName,
int&nbsp;maxPrecision)</pre>
<div class="block">Converts an instance of RelDataType to an instance of SqlDataTypeSpec.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type</code> - type descriptor</dd>
<dd><code>charSetName</code> - charSet name</dd>
<dd><code>maxPrecision</code> - The max allowed precision.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>corresponding parse representation</dd>
</dl>
</li>
</ul>
<a id="convertTypeToSpec(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertTypeToSpec</h4>
<pre class="methodSignature">public static&nbsp;<a href="../SqlDataTypeSpec.html" title="class in org.apache.calcite.sql">SqlDataTypeSpec</a>&nbsp;convertTypeToSpec&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<div class="block">Converts an instance of RelDataType to an instance of SqlDataTypeSpec.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type</code> - type descriptor</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>corresponding parse representation</dd>
</dl>
</li>
</ul>
<a id="createMultisetType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createMultisetType</h4>
<pre class="methodSignature">public static&nbsp;<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;createMultisetType&#8203;(<a href="../../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type,
boolean&nbsp;nullable)</pre>
</li>
</ul>
<a id="createArrayType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createArrayType</h4>
<pre class="methodSignature">public static&nbsp;<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;createArrayType&#8203;(<a href="../../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type,
boolean&nbsp;nullable)</pre>
</li>
</ul>
<a id="createMapType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createMapType</h4>
<pre class="methodSignature">public static&nbsp;<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;createMapType&#8203;(<a href="../../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;keyType,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;valueType,
boolean&nbsp;nullable)</pre>
</li>
</ul>
<a id="addCharsetAndCollation(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataTypeFactory)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addCharsetAndCollation</h4>
<pre class="methodSignature">public static&nbsp;<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;addCharsetAndCollation&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type,
<a href="../../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory)</pre>
<div class="block">Adds collation and charset to a character type, returns other types
unchanged.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type</code> - Type</dd>
<dd><code>typeFactory</code> - Type factory</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Type with added charset and collation, or unchanged type if it is
not a char type.</dd>
</dl>
</li>
</ul>
<a id="equalSansNullability(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>equalSansNullability</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;equalSansNullability&#8203;(<a href="../../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;factory,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type1,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type2)</pre>
<div class="block">Returns whether two types are equal, ignoring nullability.
<p>They need not come from the same factory.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>factory</code> - Type factory</dd>
<dd><code>type1</code> - First type</dd>
<dd><code>type2</code> - Second type</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether types are equal, ignoring nullability</dd>
</dl>
</li>
</ul>
<a id="equalAsStructSansNullability(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.sql.validate.SqlNameMatcher)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equalAsStructSansNullability</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;equalAsStructSansNullability&#8203;(<a href="../../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;factory,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type1,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type2,
<a href="../validate/SqlNameMatcher.html" title="interface in org.apache.calcite.sql.validate">SqlNameMatcher</a>&nbsp;nameMatcher)</pre>
<div class="block">Returns whether two struct types are equal, ignoring nullability.
<p>They do not need to come from the same factory.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>factory</code> - Type factory</dd>
<dd><code>type1</code> - First type</dd>
<dd><code>type2</code> - Second type</dd>
<dd><code>nameMatcher</code> - Name matcher used to compare the field names</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Whether types are equal, ignoring nullability</dd>
</dl>
</li>
</ul>
<a id="findField(org.apache.calcite.rel.type.RelDataType,java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>findField</h4>
<pre class="methodSignature">public static&nbsp;int&nbsp;findField&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type,
java.lang.String&nbsp;fieldName)</pre>
<div class="block">Returns the ordinal of a given field in a record type, or -1 if the field
is not found.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type</code> - Record type</dd>
<dd><code>fieldName</code> - Name of field</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Ordinal of field</dd>
</dl>
</li>
</ul>
<a id="projectTypes(org.apache.calcite.rel.type.RelDataType,java.util.List)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>projectTypes</h4>
<pre class="methodSignature">public static&nbsp;java.util.List&lt;<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&gt;&nbsp;projectTypes&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;rowType,
java.util.List&lt;? extends java.lang.Number&gt;&nbsp;requiredFields)</pre>
<div class="block">Selects data types of the specified fields from an input row type.
This is useful when identifying data types of a function that is going
to operate on inputs that are specified as field ordinals (e.g.
aggregate calls).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>rowType</code> - input row type</dd>
<dd><code>requiredFields</code> - ordinals of the projected fields</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>list of data types that are requested by requiredFields</dd>
</dl>
</li>
</ul>
<a id="createEmptyStructType(org.apache.calcite.rel.type.RelDataTypeFactory)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createEmptyStructType</h4>
<pre class="methodSignature">public static&nbsp;<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;createEmptyStructType&#8203;(<a href="../../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory)</pre>
<div class="block">Records a struct type with no fields.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>typeFactory</code> - Type factory</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Struct type with no fields</dd>
</dl>
</li>
</ul>
<a id="isFlat(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isFlat</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isFlat&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<div class="block">Returns whether a type is flat. It is not flat if it is a record type that
has one or more fields that are themselves record types.</div>
</li>
</ul>
<a id="isComparable(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isComparable</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isComparable&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type1,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type2)</pre>
<div class="block">Returns whether two types are comparable. They need to be scalar types of
the same family, or struct types whose fields are pairwise comparable.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type1</code> - First type</dd>
<dd><code>type2</code> - Second type</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Whether types are comparable</dd>
</dl>
</li>
</ul>
<a id="leastRestrictiveForComparison(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>leastRestrictiveForComparison</h4>
<pre class="methodSignature">public static&nbsp;<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;leastRestrictiveForComparison&#8203;(<a href="../../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type1,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type2)</pre>
<div class="block">Returns the least restrictive type T, such that a value of type T can be
compared with values of type <code>type0</code> and <code>type1</code> using
<code>=</code>.</div>
</li>
</ul>
<a id="family(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>family</h4>
<pre class="methodSignature">protected static&nbsp;<a href="../../rel/type/RelDataTypeFamily.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFamily</a>&nbsp;family&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
</li>
</ul>
<a id="areSameFamily(java.lang.Iterable)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>areSameFamily</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;areSameFamily&#8203;(java.lang.Iterable&lt;<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&gt;&nbsp;types)</pre>
<div class="block">Returns whether all types in a collection have the same family, as
determined by <a href="#isSameFamily(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)"><code>isSameFamily(RelDataType, RelDataType)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>types</code> - Types to check</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if all types are of the same family</dd>
</dl>
</li>
</ul>
<a id="isSameFamily(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isSameFamily</h4>
<pre class="methodSignature">private static&nbsp;boolean&nbsp;isSameFamily&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type1,
<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type2)</pre>
<div class="block">Returns whether two types are scalar types of the same family, or struct types whose fields
are pairwise of the same family.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type1</code> - First type</dd>
<dd><code>type2</code> - Second type</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Whether types have the same family</dd>
</dl>
</li>
</ul>
<a id="canConvertStringInCompare(org.apache.calcite.rel.type.RelDataTypeFamily)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>canConvertStringInCompare</h4>
<pre class="methodSignature">private static&nbsp;boolean&nbsp;canConvertStringInCompare&#8203;(<a href="../../rel/type/RelDataTypeFamily.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFamily</a>&nbsp;family)</pre>
<div class="block">Returns whether a character data type can be implicitly converted to a
given family in a compare operation.</div>
</li>
</ul>
<a id="isUnicode(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isUnicode</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isUnicode&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<div class="block">Checks whether a type represents Unicode character data.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type</code> - type to test</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether type represents Unicode character data</dd>
</dl>
</li>
</ul>
<a id="maxPrecision(int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>maxPrecision</h4>
<pre class="methodSignature">public static&nbsp;int&nbsp;maxPrecision&#8203;(int&nbsp;p0,
int&nbsp;p1)</pre>
<div class="block">Returns the larger of two precisions, treating
<a href="../../rel/type/RelDataType.html#PRECISION_NOT_SPECIFIED"><code>RelDataType.PRECISION_NOT_SPECIFIED</code></a> as infinity.</div>
</li>
</ul>
<a id="comparePrecision(int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>comparePrecision</h4>
<pre class="methodSignature">public static&nbsp;int&nbsp;comparePrecision&#8203;(int&nbsp;p0,
int&nbsp;p1)</pre>
<div class="block">Returns whether a precision is greater or equal than another,
treating <a href="../../rel/type/RelDataType.html#PRECISION_NOT_SPECIFIED"><code>RelDataType.PRECISION_NOT_SPECIFIED</code></a> as infinity.</div>
</li>
</ul>
<a id="isArray(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isArray</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isArray&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if type is ARRAY</dd>
</dl>
</li>
</ul>
<a id="isMap(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isMap</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isMap&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if type is MAP</dd>
</dl>
</li>
</ul>
<a id="isCharacter(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isCharacter</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isCharacter&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if type is CHARACTER</dd>
</dl>
</li>
</ul>
<a id="hasCharactor(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasCharactor</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;hasCharactor&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the type is a CHARACTER or contains a CHARACTER type</dd>
</dl>
</li>
</ul>
<a id="isString(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isString</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isString&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if type is STRING</dd>
</dl>
</li>
</ul>
<a id="isBoolean(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isBoolean</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isBoolean&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if type is BOOLEAN</dd>
</dl>
</li>
</ul>
<a id="isBinary(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isBinary</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isBinary&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if type is BINARY</dd>
</dl>
</li>
</ul>
<a id="isAtomic(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isAtomic</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isAtomic&#8203;(<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if type is Atomic</dd>
</dl>
</li>
</ul>
<a id="getMaxPrecisionScaleDecimal(org.apache.calcite.rel.type.RelDataTypeFactory)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getMaxPrecisionScaleDecimal</h4>
<pre class="methodSignature">public static&nbsp;<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;getMaxPrecisionScaleDecimal&#8203;(<a href="../../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;factory)</pre>
<div class="block">Get decimal with max precision/scale for the current type system.</div>
</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/SqlTypeUtil.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>Nested&nbsp;|&nbsp;</li>
<li>Field&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>Field&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>