blob: a112bdd2f217cb433f61727296f488bb41d9f892 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>BasicSqlType (Apache Calcite API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="declaration: package: org.apache.calcite.sql.type, class: BasicSqlType">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../script-dir/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="../../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var evenRowColor = "even-row-color";
var oddRowColor = "odd-row-color";
var tableTab = "table-tab";
var activeTableTab = "active-table-tab";
var pathtoroot = "../../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<div class="about-language"><b>Apache Calcite</b></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html#class">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field-summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li><a href="#field-detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.calcite.sql.type</a></div>
<h1 title="Class BasicSqlType" class="title">Class BasicSqlType</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a>
<div class="inheritance"><a href="../../rel/type/RelDataTypeImpl.html" title="class in org.apache.calcite.rel.type">org.apache.calcite.rel.type.RelDataTypeImpl</a>
<div class="inheritance"><a href="AbstractSqlType.html" title="class in org.apache.calcite.sql.type">org.apache.calcite.sql.type.AbstractSqlType</a>
<div class="inheritance">org.apache.calcite.sql.type.BasicSqlType</div>
</div>
</div>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/Serializable.html" title="class or interface in java.io" class="external-link">Serializable</a></code>, <code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Cloneable.html" title="class or interface in java.lang" class="external-link">Cloneable</a></code>, <code><a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code>, <code><a href="../../rel/type/RelDataTypeFamily.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFamily</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">BasicSqlType</span>
<span class="extends-implements">extends <a href="AbstractSqlType.html" title="class in org.apache.calcite.sql.type">AbstractSqlType</a></span></div>
<div class="block">BasicSqlType represents a standard atomic SQL type (excluding interval
types).
<p>Instances of this class are immutable.</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="../../../../../serialized-form.html#org.apache.calcite.sql.type.BasicSqlType">Serialized Form</a></li>
</ul>
</dd>
</dl>
</section>
<section class="summary">
<ul class="summary-list">
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="caption"><span>Fields</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>protected final <a href="../../rel/type/RelDataTypeSystem.html" title="interface in org.apache.calcite.rel.type">RelDataTypeSystem</a></code></div>
<div class="col-second even-row-color"><code><a href="#typeSystem" class="member-name-link">typeSystem</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
</div>
<div class="inherited-list">
<h3 id="fields-inherited-from-class-org.apache.calcite.sql.type.AbstractSqlType">Fields inherited from class&nbsp;org.apache.calcite.sql.type.<a href="AbstractSqlType.html" title="class in org.apache.calcite.sql.type">AbstractSqlType</a></h3>
<code><a href="AbstractSqlType.html#isNullable">isNullable</a>, <a href="AbstractSqlType.html#typeName">typeName</a></code></div>
<div class="inherited-list">
<h3 id="fields-inherited-from-class-org.apache.calcite.rel.type.RelDataTypeImpl">Fields inherited from class&nbsp;org.apache.calcite.rel.type.<a href="../../rel/type/RelDataTypeImpl.html" title="class in org.apache.calcite.rel.type">RelDataTypeImpl</a></h3>
<code><a href="../../rel/type/RelDataTypeImpl.html#digest">digest</a>, <a href="../../rel/type/RelDataTypeImpl.html#fieldList">fieldList</a>, <a href="../../rel/type/RelDataTypeImpl.html#NON_NULLABLE_SUFFIX">NON_NULLABLE_SUFFIX</a></code></div>
<div class="inherited-list">
<h3 id="fields-inherited-from-class-org.apache.calcite.rel.type.RelDataType">Fields inherited from interface&nbsp;org.apache.calcite.rel.type.<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></h3>
<code><a href="../../rel/type/RelDataType.html#PRECISION_NOT_SPECIFIED">PRECISION_NOT_SPECIFIED</a>, <a href="../../rel/type/RelDataType.html#SCALE_NOT_SPECIFIED">SCALE_NOT_SPECIFIED</a></code></div>
</section>
</li>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier</div>
<div class="table-header col-second">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>&nbsp;</code></div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(org.apache.calcite.rel.type.RelDataTypeSystem,org.apache.calcite.sql.type.SqlTypeName)" class="member-name-link">BasicSqlType</a><wbr>(<a href="../../rel/type/RelDataTypeSystem.html" title="interface in org.apache.calcite.rel.type">RelDataTypeSystem</a>&nbsp;typeSystem,
<a href="SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</code></div>
<div class="col-last even-row-color">
<div class="block">Constructs a type with no parameters.</div>
</div>
<div class="col-first odd-row-color"><code>protected </code></div>
<div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(org.apache.calcite.rel.type.RelDataTypeSystem,org.apache.calcite.sql.type.SqlTypeName,boolean)" class="member-name-link">BasicSqlType</a><wbr>(<a href="../../rel/type/RelDataTypeSystem.html" title="interface in org.apache.calcite.rel.type">RelDataTypeSystem</a>&nbsp;typeSystem,
<a href="SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
boolean&nbsp;nullable)</code></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><code>&nbsp;</code></div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(org.apache.calcite.rel.type.RelDataTypeSystem,org.apache.calcite.sql.type.SqlTypeName,int)" class="member-name-link">BasicSqlType</a><wbr>(<a href="../../rel/type/RelDataTypeSystem.html" title="interface in org.apache.calcite.rel.type">RelDataTypeSystem</a>&nbsp;typeSystem,
<a href="SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
int&nbsp;precision)</code></div>
<div class="col-last even-row-color">
<div class="block">Constructs a type with precision/length but no scale.</div>
</div>
<div class="col-first odd-row-color"><code>&nbsp;</code></div>
<div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(org.apache.calcite.rel.type.RelDataTypeSystem,org.apache.calcite.sql.type.SqlTypeName,int,int)" class="member-name-link">BasicSqlType</a><wbr>(<a href="../../rel/type/RelDataTypeSystem.html" title="interface in org.apache.calcite.rel.type">RelDataTypeSystem</a>&nbsp;typeSystem,
<a href="SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
int&nbsp;precision,
int&nbsp;scale)</code></div>
<div class="col-last odd-row-color">
<div class="block">Constructs a type with precision/length and scale.</div>
</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>protected static void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#checkPrecScale(org.apache.calcite.sql.type.SqlTypeName,boolean,boolean)" class="member-name-link">checkPrecScale</a><wbr>(<a href="SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
boolean&nbsp;precisionSpecified,
boolean&nbsp;scaleSpecified)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Throws if <code>typeName</code> does not allow the given combination of
precision and scale.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#generateTypeString(java.lang.StringBuilder,boolean)" class="member-name-link">generateTypeString</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/StringBuilder.html" title="class or interface in java.lang" class="external-link">StringBuilder</a>&nbsp;sb,
boolean&nbsp;withDetail)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Generates a string representation of this type.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>@Nullable <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/charset/Charset.html" title="class or interface in java.nio.charset" class="external-link">Charset</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getCharset()" class="member-name-link">getCharset</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets this type's character set, or null if this type cannot carry a
character set or has no character set defined.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>@Nullable <a href="../SqlCollation.html" title="class in org.apache.calcite.sql">SqlCollation</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getCollation()" class="member-name-link">getCollation</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets this type's collation, or null if this type cannot carry a collation
or has no collation defined.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>@Nullable <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getLimit(boolean,org.apache.calcite.sql.type.SqlTypeName.Limit,boolean)" class="member-name-link">getLimit</a><wbr>(boolean&nbsp;sign,
<a href="SqlTypeName.Limit.html" title="enum in org.apache.calcite.sql.type">SqlTypeName.Limit</a>&nbsp;limit,
boolean&nbsp;beyond)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns a value which is a limit for this type.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getPrecision()" class="member-name-link">getPrecision</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the JDBC-defined precision for values of this type.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getScale()" class="member-name-link">getScale</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the scale of this type.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-org.apache.calcite.sql.type.AbstractSqlType">Methods inherited from class&nbsp;org.apache.calcite.sql.type.<a href="AbstractSqlType.html" title="class in org.apache.calcite.sql.type">AbstractSqlType</a></h3>
<code><a href="AbstractSqlType.html#getFamily()">getFamily</a>, <a href="AbstractSqlType.html#getPrecedenceList()">getPrecedenceList</a>, <a href="AbstractSqlType.html#getSqlTypeName()">getSqlTypeName</a>, <a href="AbstractSqlType.html#isNullable()">isNullable</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-org.apache.calcite.rel.type.RelDataTypeImpl">Methods inherited from class&nbsp;org.apache.calcite.rel.type.<a href="../../rel/type/RelDataTypeImpl.html" title="class in org.apache.calcite.rel.type">RelDataTypeImpl</a></h3>
<code><a href="../../rel/type/RelDataTypeImpl.html#computeDigest()">computeDigest</a>, <a href="../../rel/type/RelDataTypeImpl.html#equals(java.lang.Object)">equals</a>, <a href="../../rel/type/RelDataTypeImpl.html#extra(org.apache.calcite.rel.type.RelDataType)">extra</a>, <a href="../../rel/type/RelDataTypeImpl.html#getComparability()">getComparability</a>, <a href="../../rel/type/RelDataTypeImpl.html#getComponentType()">getComponentType</a>, <a href="../../rel/type/RelDataTypeImpl.html#getField(java.lang.String,boolean,boolean)">getField</a>, <a href="../../rel/type/RelDataTypeImpl.html#getFieldCount()">getFieldCount</a>, <a href="../../rel/type/RelDataTypeImpl.html#getFieldList()">getFieldList</a>, <a href="../../rel/type/RelDataTypeImpl.html#getFieldMap()">getFieldMap</a>, <a href="../../rel/type/RelDataTypeImpl.html#getFieldNames()">getFieldNames</a>, <a href="../../rel/type/RelDataTypeImpl.html#getFullTypeString()">getFullTypeString</a>, <a href="../../rel/type/RelDataTypeImpl.html#getIntervalQualifier()">getIntervalQualifier</a>, <a href="../../rel/type/RelDataTypeImpl.html#getKeyType()">getKeyType</a>, <a href="../../rel/type/RelDataTypeImpl.html#getSqlIdentifier()">getSqlIdentifier</a>, <a href="../../rel/type/RelDataTypeImpl.html#getStructKind()">getStructKind</a>, <a href="../../rel/type/RelDataTypeImpl.html#getValueType()">getValueType</a>, <a href="../../rel/type/RelDataTypeImpl.html#hashCode()">hashCode</a>, <a href="../../rel/type/RelDataTypeImpl.html#isDynamicStruct()">isDynamicStruct</a>, <a href="../../rel/type/RelDataTypeImpl.html#isStruct()">isStruct</a>, <a href="../../rel/type/RelDataTypeImpl.html#proto(org.apache.calcite.rel.type.RelDataType)">proto</a>, <a href="../../rel/type/RelDataTypeImpl.html#proto(org.apache.calcite.sql.type.SqlTypeName,boolean)">proto</a>, <a href="../../rel/type/RelDataTypeImpl.html#proto(org.apache.calcite.sql.type.SqlTypeName,int,boolean)">proto</a>, <a href="../../rel/type/RelDataTypeImpl.html#proto(org.apache.calcite.sql.type.SqlTypeName,int,int,boolean)">proto</a>, <a href="../../rel/type/RelDataTypeImpl.html#toString()">toString</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-org.apache.calcite.rel.type.RelDataType">Methods inherited from interface&nbsp;org.apache.calcite.rel.type.<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></h3>
<code><a href="../../rel/type/RelDataType.html#equalsSansFieldNames(org.apache.calcite.rel.type.RelDataType)">equalsSansFieldNames</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ FIELD DETAIL =========== -->
<li>
<section class="field-details" id="field-detail">
<h2>Field Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="typeSystem">
<h3>typeSystem</h3>
<div class="member-signature"><span class="modifiers">protected final</span>&nbsp;<span class="return-type"><a href="../../rel/type/RelDataTypeSystem.html" title="interface in org.apache.calcite.rel.type">RelDataTypeSystem</a></span>&nbsp;<span class="element-name">typeSystem</span></div>
</section>
</li>
</ul>
</section>
</li>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;(org.apache.calcite.rel.type.RelDataTypeSystem,org.apache.calcite.sql.type.SqlTypeName)">
<h3>BasicSqlType</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">BasicSqlType</span><wbr><span class="parameters">(<a href="../../rel/type/RelDataTypeSystem.html" title="interface in org.apache.calcite.rel.type">RelDataTypeSystem</a>&nbsp;typeSystem,
<a href="SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</span></div>
<div class="block">Constructs a type with no parameters. This should only be called from a
factory method.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>typeSystem</code> - Type system</dd>
<dd><code>typeName</code> - Type name</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(org.apache.calcite.rel.type.RelDataTypeSystem,org.apache.calcite.sql.type.SqlTypeName,boolean)">
<h3>BasicSqlType</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="element-name">BasicSqlType</span><wbr><span class="parameters">(<a href="../../rel/type/RelDataTypeSystem.html" title="interface in org.apache.calcite.rel.type">RelDataTypeSystem</a>&nbsp;typeSystem,
<a href="SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
boolean&nbsp;nullable)</span></div>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(org.apache.calcite.rel.type.RelDataTypeSystem,org.apache.calcite.sql.type.SqlTypeName,int)">
<h3>BasicSqlType</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">BasicSqlType</span><wbr><span class="parameters">(<a href="../../rel/type/RelDataTypeSystem.html" title="interface in org.apache.calcite.rel.type">RelDataTypeSystem</a>&nbsp;typeSystem,
<a href="SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
int&nbsp;precision)</span></div>
<div class="block">Constructs a type with precision/length but no scale.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>typeSystem</code> - Type system</dd>
<dd><code>typeName</code> - Type name</dd>
<dd><code>precision</code> - Precision (called length for some types)</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(org.apache.calcite.rel.type.RelDataTypeSystem,org.apache.calcite.sql.type.SqlTypeName,int,int)">
<h3>BasicSqlType</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">BasicSqlType</span><wbr><span class="parameters">(<a href="../../rel/type/RelDataTypeSystem.html" title="interface in org.apache.calcite.rel.type">RelDataTypeSystem</a>&nbsp;typeSystem,
<a href="SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
int&nbsp;precision,
int&nbsp;scale)</span></div>
<div class="block">Constructs a type with precision/length and scale.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>typeSystem</code> - Type system</dd>
<dd><code>typeName</code> - Type name</dd>
<dd><code>precision</code> - Precision (called length for some types)</dd>
<dd><code>scale</code> - Scale</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="checkPrecScale(org.apache.calcite.sql.type.SqlTypeName,boolean,boolean)">
<h3>checkPrecScale</h3>
<div class="member-signature"><span class="modifiers">protected static</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">checkPrecScale</span><wbr><span class="parameters">(<a href="SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
boolean&nbsp;precisionSpecified,
boolean&nbsp;scaleSpecified)</span></div>
<div class="block">Throws if <code>typeName</code> does not allow the given combination of
precision and scale.</div>
</section>
</li>
<li>
<section class="detail" id="getPrecision()">
<h3>getPrecision</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getPrecision</span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="../../rel/type/RelDataType.html#getPrecision()">RelDataType</a></code></span></div>
<div class="block">Gets the JDBC-defined precision for values of this type. Note that this
is not always the same as the user-specified precision. For example, the
type INTEGER has no user-specified precision, but this method returns 10
for an INTEGER type.
<p>Returns <a href="../../rel/type/RelDataType.html#PRECISION_NOT_SPECIFIED"><code>RelDataType.PRECISION_NOT_SPECIFIED</code></a> (-1) if precision is not
applicable for this type.</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../../rel/type/RelDataType.html#getPrecision()">getPrecision</a></code>&nbsp;in interface&nbsp;<code><a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></dd>
<dt>Overrides:</dt>
<dd><code><a href="../../rel/type/RelDataTypeImpl.html#getPrecision()">getPrecision</a></code>&nbsp;in class&nbsp;<code><a href="../../rel/type/RelDataTypeImpl.html" title="class in org.apache.calcite.rel.type">RelDataTypeImpl</a></code></dd>
<dt>Returns:</dt>
<dd>number of decimal digits for exact numeric types; number of
decimal digits in mantissa for approximate numeric types; number of
decimal digits for fractional seconds of datetime types; length in
characters for character types; length in bytes for binary types; length
in bits for bit types; 1 for BOOLEAN; -1 if precision is not valid for
this type</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getScale()">
<h3>getScale</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getScale</span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="../../rel/type/RelDataType.html#getScale()">RelDataType</a></code></span></div>
<div class="block">Gets the scale of this type. Returns <a href="../../rel/type/RelDataType.html#SCALE_NOT_SPECIFIED"><code>RelDataType.SCALE_NOT_SPECIFIED</code></a> (-1) if
scale is not valid for this type.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../../rel/type/RelDataType.html#getScale()">getScale</a></code>&nbsp;in interface&nbsp;<code><a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></dd>
<dt>Overrides:</dt>
<dd><code><a href="../../rel/type/RelDataTypeImpl.html#getScale()">getScale</a></code>&nbsp;in class&nbsp;<code><a href="../../rel/type/RelDataTypeImpl.html" title="class in org.apache.calcite.rel.type">RelDataTypeImpl</a></code></dd>
<dt>Returns:</dt>
<dd>number of digits of scale</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getCharset()">
<h3>getCharset</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">@Nullable <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/charset/Charset.html" title="class or interface in java.nio.charset" class="external-link">Charset</a></span>&nbsp;<span class="element-name">getCharset</span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="../../rel/type/RelDataType.html#getCharset()">RelDataType</a></code></span></div>
<div class="block">Gets this type's character set, or null if this type cannot carry a
character set or has no character set defined.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../../rel/type/RelDataType.html#getCharset()">getCharset</a></code>&nbsp;in interface&nbsp;<code><a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></dd>
<dt>Overrides:</dt>
<dd><code><a href="../../rel/type/RelDataTypeImpl.html#getCharset()">getCharset</a></code>&nbsp;in class&nbsp;<code><a href="../../rel/type/RelDataTypeImpl.html" title="class in org.apache.calcite.rel.type">RelDataTypeImpl</a></code></dd>
<dt>Returns:</dt>
<dd>charset of type</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getCollation()">
<h3>getCollation</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">@Nullable <a href="../SqlCollation.html" title="class in org.apache.calcite.sql">SqlCollation</a></span>&nbsp;<span class="element-name">getCollation</span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="../../rel/type/RelDataType.html#getCollation()">RelDataType</a></code></span></div>
<div class="block">Gets this type's collation, or null if this type cannot carry a collation
or has no collation defined.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../../rel/type/RelDataType.html#getCollation()">getCollation</a></code>&nbsp;in interface&nbsp;<code><a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></dd>
<dt>Overrides:</dt>
<dd><code><a href="../../rel/type/RelDataTypeImpl.html#getCollation()">getCollation</a></code>&nbsp;in class&nbsp;<code><a href="../../rel/type/RelDataTypeImpl.html" title="class in org.apache.calcite.rel.type">RelDataTypeImpl</a></code></dd>
<dt>Returns:</dt>
<dd>collation of type</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="generateTypeString(java.lang.StringBuilder,boolean)">
<h3>generateTypeString</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">generateTypeString</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/StringBuilder.html" title="class or interface in java.lang" class="external-link">StringBuilder</a>&nbsp;sb,
boolean&nbsp;withDetail)</span></div>
<div class="block"><span class="descfrm-type-label">Description copied from class:&nbsp;<code><a href="../../rel/type/RelDataTypeImpl.html#generateTypeString(java.lang.StringBuilder,boolean)">RelDataTypeImpl</a></code></span></div>
<div class="block">Generates a string representation of this type.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../../rel/type/RelDataTypeImpl.html#generateTypeString(java.lang.StringBuilder,boolean)">generateTypeString</a></code>&nbsp;in class&nbsp;<code><a href="../../rel/type/RelDataTypeImpl.html" title="class in org.apache.calcite.rel.type">RelDataTypeImpl</a></code></dd>
<dt>Parameters:</dt>
<dd><code>sb</code> - StringBuilder into which to generate the string</dd>
<dd><code>withDetail</code> - when true, all detail information needed to compute a
unique digest (and return from getFullTypeString) should
be included;</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getLimit(boolean,org.apache.calcite.sql.type.SqlTypeName.Limit,boolean)">
<h3>getLimit</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">@Nullable <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span>&nbsp;<span class="element-name">getLimit</span><wbr><span class="parameters">(boolean&nbsp;sign,
<a href="SqlTypeName.Limit.html" title="enum in org.apache.calcite.sql.type">SqlTypeName.Limit</a>&nbsp;limit,
boolean&nbsp;beyond)</span></div>
<div class="block">Returns a value which is a limit for this type.
<p>For example,
<table border="1">
<caption>Limits</caption>
<tr>
<th>Datatype</th>
<th>sign</th>
<th>limit</th>
<th>beyond</th>
<th>precision</th>
<th>scale</th>
<th>Returns</th>
</tr>
<tr>
<td>Integer</td>
<td>true</td>
<td>true</td>
<td>false</td>
<td>-1</td>
<td>-1</td>
<td>2147483647 (2 ^ 31 -1 = MAXINT)</td>
</tr>
<tr>
<td>Integer</td>
<td>true</td>
<td>true</td>
<td>true</td>
<td>-1</td>
<td>-1</td>
<td>2147483648 (2 ^ 31 = MAXINT + 1)</td>
</tr>
<tr>
<td>Integer</td>
<td>false</td>
<td>true</td>
<td>false</td>
<td>-1</td>
<td>-1</td>
<td>-2147483648 (-2 ^ 31 = MININT)</td>
</tr>
<tr>
<td>Boolean</td>
<td>true</td>
<td>true</td>
<td>false</td>
<td>-1</td>
<td>-1</td>
<td>TRUE</td>
</tr>
<tr>
<td>Varchar</td>
<td>true</td>
<td>true</td>
<td>false</td>
<td>10</td>
<td>-1</td>
<td>'ZZZZZZZZZZ'</td>
</tr>
</table></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>sign</code> - If true, returns upper limit, otherwise lower limit</dd>
<dd><code>limit</code> - If true, returns value at or near to overflow; otherwise
value at or near to underflow</dd>
<dd><code>beyond</code> - If true, returns the value just beyond the limit, otherwise
the value at the limit</dd>
<dt>Returns:</dt>
<dd>Limit value</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &copy; 2012-2023 Apache Software Foundation. All Rights Reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>