blob: 5c46af77622fa21b7c271c51c28315f1521e480a [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>SqlLiteral (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, class: SqlLiteral">
<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><a href="#nested-class-summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field-summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="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</a></div>
<h1 title="Class SqlLiteral" class="title">Class SqlLiteral</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="SqlNode.html" title="class in org.apache.calcite.sql">org.apache.calcite.sql.SqlNode</a>
<div class="inheritance">org.apache.calcite.sql.SqlLiteral</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/lang/Cloneable.html" title="class or interface in java.lang" class="external-link">Cloneable</a></code></dd>
</dl>
<dl class="notes">
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="SqlAbstractDateTimeLiteral.html" title="class in org.apache.calcite.sql">SqlAbstractDateTimeLiteral</a></code>, <code><a href="SqlBinaryStringLiteral.html" title="class in org.apache.calcite.sql">SqlBinaryStringLiteral</a></code>, <code><a href="SqlCharStringLiteral.html" title="class in org.apache.calcite.sql">SqlCharStringLiteral</a></code>, <code><a href="SqlIntervalLiteral.html" title="class in org.apache.calcite.sql">SqlIntervalLiteral</a></code>, <code><a href="SqlNumericLiteral.html" title="class in org.apache.calcite.sql">SqlNumericLiteral</a></code>, <code><a href="SqlUnknownLiteral.html" title="class in org.apache.calcite.sql">SqlUnknownLiteral</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">SqlLiteral</span>
<span class="extends-implements">extends <a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></span></div>
<div class="block">A <code>SqlLiteral</code> is a constant. It is, appropriately, immutable.
<p>How is the value stored? In that respect, the class is somewhat of a black
box. There is a <a href="#getValue()"><code>getValue()</code></a> method which returns the value as an
object, but the type of that value is implementation detail, and it is best
that your code does not depend upon that knowledge. It is better to use
task-oriented methods such as <a href="SqlNode.html#toSqlString(org.apache.calcite.sql.SqlDialect)"><code>SqlNode.toSqlString(SqlDialect)</code></a> and
<a href="#toValue()"><code>toValue()</code></a>.</p>
<p>If you really need to access the value directly, you should switch on the
value of the <code>typeName</code> field, rather than making assumptions about
the runtime type of the <a href="#value"><code>value</code></a>.</p>
<p>The allowable types and combinations are:
<table>
<caption>Allowable types for SqlLiteral</caption>
<tr>
<th>TypeName</th>
<th>Meaning</th>
<th>Value type</th>
</tr>
<tr>
<td><a href="type/SqlTypeName.html#NULL"><code>SqlTypeName.NULL</code></a></td>
<td>The null value. It has its own special type.</td>
<td>null</td>
</tr>
<tr>
<td><a href="type/SqlTypeName.html#BOOLEAN"><code>SqlTypeName.BOOLEAN</code></a></td>
<td>Boolean, namely <code>TRUE</code>, <code>FALSE</code> or <code>
UNKNOWN</code>.</td>
<td><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Boolean.html" title="class or interface in java.lang" class="external-link"><code>Boolean</code></a>, or null represents the UNKNOWN value</td>
</tr>
<tr>
<td><a href="type/SqlTypeName.html#DECIMAL"><code>SqlTypeName.DECIMAL</code></a></td>
<td>Exact number, for example <code>0</code>, <code>-.5</code>, <code>
12345</code>.</td>
<td><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/math/BigDecimal.html" title="class or interface in java.math" class="external-link"><code>BigDecimal</code></a></td>
</tr>
<tr>
<td><a href="type/SqlTypeName.html#DOUBLE"><code>SqlTypeName.DOUBLE</code></a></td>
<td>Approximate number, for example <code>6.023E-23</code>.</td>
<td><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/math/BigDecimal.html" title="class or interface in java.math" class="external-link"><code>BigDecimal</code></a></td>
</tr>
<tr>
<td><a href="type/SqlTypeName.html#DATE"><code>SqlTypeName.DATE</code></a></td>
<td>Date, for example <code>DATE '1969-04'29'</code></td>
<td><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Calendar.html" title="class or interface in java.util" class="external-link"><code>Calendar</code></a></td>
</tr>
<tr>
<td><a href="type/SqlTypeName.html#TIME"><code>SqlTypeName.TIME</code></a></td>
<td>Time, for example <code>TIME '18:37:42.567'</code></td>
<td><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Calendar.html" title="class or interface in java.util" class="external-link"><code>Calendar</code></a></td>
</tr>
<tr>
<td><a href="type/SqlTypeName.html#TIMESTAMP"><code>SqlTypeName.TIMESTAMP</code></a></td>
<td>Timestamp, for example <code>TIMESTAMP '1969-04-29
18:37:42.567'</code></td>
<td><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Calendar.html" title="class or interface in java.util" class="external-link"><code>Calendar</code></a></td>
</tr>
<tr>
<td><a href="type/SqlTypeName.html#CHAR"><code>SqlTypeName.CHAR</code></a></td>
<td>Character constant, for example <code>'Hello, world!'</code>, <code>
''</code>, <code>_N'Bonjour'</code>, <code>_ISO-8859-1'It''s superman!'
COLLATE SHIFT_JIS$ja_JP$2</code>. These are always CHAR, never VARCHAR.</td>
<td><a href="../util/NlsString.html" title="class in org.apache.calcite.util"><code>NlsString</code></a></td>
</tr>
<tr>
<td><a href="type/SqlTypeName.html#BINARY"><code>SqlTypeName.BINARY</code></a></td>
<td>Binary constant, for example <code>X'ABC'</code>, <code>X'7F'</code>.
Note that strings with an odd number of hexits will later become values of
the BIT datatype, because they have an incomplete number of bytes. But here,
they are all binary constants, because that's how they were written. These
constants are always BINARY, never VARBINARY.</td>
<td><a href="../util/BitString.html" title="class in org.apache.calcite.util"><code>BitString</code></a></td>
</tr>
<tr>
<td><a href="type/SqlTypeName.html#SYMBOL"><code>SqlTypeName.SYMBOL</code></a></td>
<td>A symbol is a special type used to make parsing easier; it is not part of
the SQL standard, and is not exposed to end-users. It is used to hold a
symbol, such as the LEADING flag in a call to the function <code>
TRIM([LEADING|TRAILING|BOTH] chars FROM string)</code>.</td>
<td>An <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Enum.html" title="class or interface in java.lang" class="external-link"><code>Enum</code></a></td>
</tr>
<tr>
<td><a href="type/SqlTypeName.html#INTERVAL_YEAR"><code>SqlTypeName.INTERVAL_YEAR</code></a>
.. <a href="type/SqlTypeName.html#INTERVAL_SECOND"><code>SqlTypeName.INTERVAL_SECOND</code></a></td>
<td>Interval, for example <code>INTERVAL '1:34' HOUR</code>.</td>
<td><a href="SqlIntervalLiteral.IntervalValue.html" title="class in org.apache.calcite.sql"><code>SqlIntervalLiteral.IntervalValue</code></a>.</td>
</tr>
</table></div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<li>
<section class="nested-class-summary" id="nested-class-summary">
<h2>Nested Class Summary</h2>
<div class="caption"><span>Nested Classes</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">Class</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>static interface&nbsp;</code></div>
<div class="col-second even-row-color"><code><a href="SqlLiteral.SqlSymbol.html" class="type-name-link" title="interface in org.apache.calcite.sql">SqlLiteral.SqlSymbol</a></code></div>
<div class="col-last even-row-color">
<div class="block"><span class="deprecated-label">Deprecated.</span></div>
</div>
</div>
</section>
</li>
<!-- =========== 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 @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"><code><a href="#value" class="member-name-link">value</a></code></div>
<div class="col-last even-row-color">
<div class="block">The value of this literal.</div>
</div>
</div>
<div class="inherited-list">
<h3 id="fields-inherited-from-class-org.apache.calcite.sql.SqlNode">Fields inherited from class&nbsp;org.apache.calcite.sql.<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></h3>
<code><a href="SqlNode.html#EMPTY_ARRAY">EMPTY_ARRAY</a>, <a href="SqlNode.html#pos">pos</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>protected </code></div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(java.lang.Object,org.apache.calcite.sql.type.SqlTypeName,org.apache.calcite.sql.parser.SqlParserPos)" class="member-name-link">SqlLiteral</a><wbr>(@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>&nbsp;value,
<a href="type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</code></div>
<div class="col-last even-row-color">
<div class="block">Creates a <code>SqlLiteral</code>.</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><button id="method-summary-table-tab6" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab6', 3)" class="table-tab">Deprecated Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>&lt;R&gt;&nbsp;R</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#accept(org.apache.calcite.sql.util.SqlVisitor)" class="member-name-link">accept</a><wbr>(<a href="util/SqlVisitor.html" title="interface in org.apache.calcite.sql.util">SqlVisitor</a>&lt;R&gt;&nbsp;visitor)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Accepts a generic visitor.</div>
</div>
<div class="col-first odd-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/math/BigDecimal.html" title="class or interface in java.math" class="external-link">BigDecimal</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#bigDecimalValue()" class="member-name-link">bigDecimalValue</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns a numeric literal's value as a <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/math/BigDecimal.html" title="class or interface in java.math" class="external-link"><code>BigDecimal</code></a>.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#booleanValue()" class="member-name-link">booleanValue</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the value as a boolean.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#clone(org.apache.calcite.sql.parser.SqlParserPos)" class="member-name-link">clone</a><wbr>(<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Clones a SqlNode with a different position.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="SqlNumericLiteral.html" title="class in org.apache.calcite.sql">SqlNumericLiteral</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#createApproxNumeric(java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)" class="member-name-link">createApproxNumeric</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;s,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="SqlBinaryStringLiteral.html" title="class in org.apache.calcite.sql">SqlBinaryStringLiteral</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#createBinaryString(byte%5B%5D,org.apache.calcite.sql.parser.SqlParserPos)" class="member-name-link">createBinaryString</a><wbr>(byte[]&nbsp;bytes,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a literal like X'ABAB' from an array of bytes.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="SqlBinaryStringLiteral.html" title="class in org.apache.calcite.sql">SqlBinaryStringLiteral</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#createBinaryString(java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)" class="member-name-link">createBinaryString</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;s,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a literal like X'ABAB'.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#createBoolean(boolean,org.apache.calcite.sql.parser.SqlParserPos)" class="member-name-link">createBoolean</a><wbr>(boolean&nbsp;b,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a boolean literal.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="SqlCharStringLiteral.html" title="class in org.apache.calcite.sql">SqlCharStringLiteral</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#createCharString(java.lang.String,java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)" class="member-name-link">createCharString</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;s,
@Nullable <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;charSet,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a string literal, with optional character-set.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="SqlCharStringLiteral.html" title="class in org.apache.calcite.sql">SqlCharStringLiteral</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#createCharString(java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)" class="member-name-link">createCharString</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;s,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a string literal in the system character set.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4 method-summary-table-tab6"><code>static <a href="SqlDateLiteral.html" title="class in org.apache.calcite.sql">SqlDateLiteral</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4 method-summary-table-tab6"><code><a href="#createDate(java.util.Calendar,org.apache.calcite.sql.parser.SqlParserPos)" class="member-name-link">createDate</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Calendar.html" title="class or interface in java.util" class="external-link">Calendar</a>&nbsp;calendar,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4 method-summary-table-tab6">
<div class="block"><span class="deprecated-label">Deprecated.</span></div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="SqlDateLiteral.html" title="class in org.apache.calcite.sql">SqlDateLiteral</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#createDate(org.apache.calcite.util.DateString,org.apache.calcite.sql.parser.SqlParserPos)" class="member-name-link">createDate</a><wbr>(<a href="../util/DateString.html" title="class in org.apache.calcite.util">DateString</a>&nbsp;date,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="SqlNumericLiteral.html" title="class in org.apache.calcite.sql">SqlNumericLiteral</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#createExactNumeric(java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)" class="member-name-link">createExactNumeric</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;s,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="SqlIntervalLiteral.html" title="class in org.apache.calcite.sql">SqlIntervalLiteral</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#createInterval(int,java.lang.String,org.apache.calcite.sql.SqlIntervalQualifier,org.apache.calcite.sql.parser.SqlParserPos)" class="member-name-link">createInterval</a><wbr>(int&nbsp;sign,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;intervalStr,
<a href="SqlIntervalQualifier.html" title="class in org.apache.calcite.sql">SqlIntervalQualifier</a>&nbsp;intervalQualifier,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates an interval literal.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="SqlNumericLiteral.html" title="class in org.apache.calcite.sql">SqlNumericLiteral</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#createNegative(org.apache.calcite.sql.SqlNumericLiteral,org.apache.calcite.sql.parser.SqlParserPos)" class="member-name-link">createNegative</a><wbr>(<a href="SqlNumericLiteral.html" title="class in org.apache.calcite.sql">SqlNumericLiteral</a>&nbsp;num,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#createNull(org.apache.calcite.sql.parser.SqlParserPos)" class="member-name-link">createNull</a><wbr>(<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a NULL literal.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#createSample(org.apache.calcite.sql.SqlSampleSpec,org.apache.calcite.sql.parser.SqlParserPos)" class="member-name-link">createSample</a><wbr>(<a href="SqlSampleSpec.html" title="class in org.apache.calcite.sql">SqlSampleSpec</a>&nbsp;sampleSpec,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a literal which represents a sample specification.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#createSqlType(org.apache.calcite.rel.type.RelDataTypeFactory)" class="member-name-link">createSqlType</a><wbr>(<a href="../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#createSymbol(java.lang.Enum,org.apache.calcite.sql.parser.SqlParserPos)" class="member-name-link">createSymbol</a><wbr>(@Nullable <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Enum.html" title="class or interface in java.lang" class="external-link">Enum</a>&lt;?&gt;&nbsp;o,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a literal which represents a parser symbol, for example the
<code>TRAILING</code> keyword in the call <code>Trim(TRAILING 'x' FROM
'Hello world!')</code>.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4 method-summary-table-tab6"><code>static <a href="SqlTimeLiteral.html" title="class in org.apache.calcite.sql">SqlTimeLiteral</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4 method-summary-table-tab6"><code><a href="#createTime(java.util.Calendar,int,org.apache.calcite.sql.parser.SqlParserPos)" class="member-name-link">createTime</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Calendar.html" title="class or interface in java.util" class="external-link">Calendar</a>&nbsp;calendar,
int&nbsp;precision,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4 method-summary-table-tab6">
<div class="block"><span class="deprecated-label">Deprecated.</span></div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="SqlTimeLiteral.html" title="class in org.apache.calcite.sql">SqlTimeLiteral</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#createTime(org.apache.calcite.util.TimeString,int,org.apache.calcite.sql.parser.SqlParserPos)" class="member-name-link">createTime</a><wbr>(<a href="../util/TimeString.html" title="class in org.apache.calcite.util">TimeString</a>&nbsp;t,
int&nbsp;precision,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4 method-summary-table-tab6"><code>static <a href="SqlTimestampLiteral.html" title="class in org.apache.calcite.sql">SqlTimestampLiteral</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4 method-summary-table-tab6"><code><a href="#createTimestamp(java.util.Calendar,int,org.apache.calcite.sql.parser.SqlParserPos)" class="member-name-link">createTimestamp</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Calendar.html" title="class or interface in java.util" class="external-link">Calendar</a>&nbsp;calendar,
int&nbsp;precision,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4 method-summary-table-tab6">
<div class="block"><span class="deprecated-label">Deprecated.</span></div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="SqlTimestampLiteral.html" title="class in org.apache.calcite.sql">SqlTimestampLiteral</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#createTimestamp(org.apache.calcite.sql.type.SqlTypeName,org.apache.calcite.util.TimestampString,int,org.apache.calcite.sql.parser.SqlParserPos)" class="member-name-link">createTimestamp</a><wbr>(<a href="type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
<a href="../util/TimestampString.html" title="class in org.apache.calcite.util">TimestampString</a>&nbsp;ts,
int&nbsp;precision,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a TIMESTAMP or TIMESTAMP WITH LOCAL TIME ZONE literal.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4 method-summary-table-tab6"><code>static <a href="SqlTimestampLiteral.html" title="class in org.apache.calcite.sql">SqlTimestampLiteral</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4 method-summary-table-tab6"><code><a href="#createTimestamp(org.apache.calcite.util.TimestampString,int,org.apache.calcite.sql.parser.SqlParserPos)" class="member-name-link">createTimestamp</a><wbr>(<a href="../util/TimestampString.html" title="class in org.apache.calcite.util">TimestampString</a>&nbsp;ts,
int&nbsp;precision,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4 method-summary-table-tab6">
<div class="block"><span class="deprecated-label">Deprecated.</span></div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#createUnknown(java.lang.String,java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)" class="member-name-link">createUnknown</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;tag,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;value,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a literal whose type is unknown until validation time.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#createUnknown(org.apache.calcite.sql.parser.SqlParserPos)" class="member-name-link">createUnknown</a><wbr>(<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#equals(java.lang.Object)" class="member-name-link">equals</a><wbr>(@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>&nbsp;obj)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#equalsDeep(org.apache.calcite.sql.SqlNode,org.apache.calcite.util.Litmus)" class="member-name-link">equalsDeep</a><wbr>(@Nullable <a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&nbsp;node,
<a href="../util/Litmus.html" title="interface in org.apache.calcite.util">Litmus</a>&nbsp;litmus)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns whether this node is structurally equivalent to another node.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="SqlKind.html" title="enum in org.apache.calcite.sql">SqlKind</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getKind()" class="member-name-link">getKind</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the type of node this is, or
<a href="SqlKind.html#OTHER"><code>SqlKind.OTHER</code></a> if it's nothing special.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="validate/SqlMonotonicity.html" title="enum in org.apache.calcite.sql.validate">SqlMonotonicity</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getMonotonicity(org.apache.calcite.sql.validate.SqlValidatorScope)" class="member-name-link">getMonotonicity</a><wbr>(@Nullable <a href="validate/SqlValidatorScope.html" title="interface in org.apache.calcite.sql.validate">SqlValidatorScope</a>&nbsp;scope)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns whether expression is always ascending, descending or constant.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6"><code><a href="#getStringValue()" class="member-name-link">getStringValue</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6">
<div class="block"><span class="deprecated-label">Deprecated.</span></div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getTypeName()" class="member-name-link">getTypeName</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the value of <code>typeName</code>.</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="#getValue()" class="member-name-link">getValue</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the value of this literal.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>&lt;T&gt;&nbsp;T</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getValueAs(java.lang.Class)" class="member-name-link">getValueAs</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;T&gt;&nbsp;clazz)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the value of this literal as a given Java 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="#hashCode()" class="member-name-link">hashCode</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</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="#intValue(boolean)" class="member-name-link">intValue</a><wbr>(boolean&nbsp;exact)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the integer value of this literal.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>long</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#longValue(boolean)" class="member-name-link">longValue</a><wbr>(boolean&nbsp;exact)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the long value of this literal.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="SqlSampleSpec.html" title="class in org.apache.calcite.sql">SqlSampleSpec</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#sampleValue(org.apache.calcite.sql.SqlNode)" class="member-name-link">sampleValue</a><wbr>(<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&nbsp;node)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Extracts the <a href="SqlSampleSpec.html" title="class in org.apache.calcite.sql"><code>SqlSampleSpec</code></a> value from a symbol literal.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6"><code>int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6"><code><a href="#signum()" class="member-name-link">signum</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6">
<div class="block"><span class="deprecated-label">Deprecated.</span></div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4 method-summary-table-tab6"><code>static <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4 method-summary-table-tab6"><code><a href="#stringValue(org.apache.calcite.sql.SqlNode)" class="member-name-link">stringValue</a><wbr>(<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&nbsp;node)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4 method-summary-table-tab6">
<div class="block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">Use <a href="#value(org.apache.calcite.sql.SqlNode)"><code>value(SqlNode)</code></a></div>
</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>&lt;E extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Enum.html" title="class or interface in java.lang" class="external-link">Enum</a>&lt;E&gt;&gt;<br>@Nullable E</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#symbolValue(java.lang.Class)" class="member-name-link">symbolValue</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;E&gt;&nbsp;class_)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the value as a symbol.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6"><code>&lt;E extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Enum.html" title="class or interface in java.lang" class="external-link">Enum</a>&lt;E&gt;&gt;<br>@Nullable E</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6"><code><a href="#symbolValue_()" class="member-name-link">symbolValue_</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6">
<div class="block"><span class="deprecated-label">Deprecated.</span></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/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toValue()" class="member-name-link">toValue</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">For calc program builder - value may be different than <a href="#unparse(org.apache.calcite.sql.SqlWriter,int,int)"><code>unparse(org.apache.calcite.sql.SqlWriter, int, int)</code></a>.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#unchain(org.apache.calcite.sql.SqlNode)" class="member-name-link">unchain</a><wbr>(<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&nbsp;node)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Converts a chained string literals into regular literals; returns regular
literals unchanged.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#unescapeUnicode(char)" class="member-name-link">unescapeUnicode</a><wbr>(char&nbsp;unicodeEscapeChar)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Transforms this literal (which must be of type character) into a new one
in which 4-digit Unicode escape sequences have been replaced with the
corresponding Unicode characters.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#unparse(org.apache.calcite.sql.SqlWriter,int,int)" class="member-name-link">unparse</a><wbr>(<a href="SqlWriter.html" title="interface in org.apache.calcite.sql">SqlWriter</a>&nbsp;writer,
int&nbsp;leftPrec,
int&nbsp;rightPrec)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Writes a SQL representation of this node to a writer.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#validate(org.apache.calcite.sql.validate.SqlValidator,org.apache.calcite.sql.validate.SqlValidatorScope)" class="member-name-link">validate</a><wbr>(<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)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Validates this node.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static @Nullable <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#value(org.apache.calcite.sql.SqlNode)" class="member-name-link">value</a><wbr>(<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&nbsp;node)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Extracts the value from a literal.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#valueMatchesType(java.lang.Object,org.apache.calcite.sql.type.SqlTypeName)" class="member-name-link">valueMatchesType</a><wbr>(@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>&nbsp;value,
<a href="type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns whether value is appropriate for its type.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-org.apache.calcite.sql.SqlNode">Methods inherited from class&nbsp;org.apache.calcite.sql.<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></h3>
<code><a href="SqlNode.html#clone()">clone</a>, <a href="SqlNode.html#clone(E)">clone</a>, <a href="SqlNode.html#cloneArray(org.apache.calcite.sql.SqlNode%5B%5D)">cloneArray</a>, <a href="SqlNode.html#equalDeep(org.apache.calcite.sql.SqlNode,org.apache.calcite.sql.SqlNode,org.apache.calcite.util.Litmus)">equalDeep</a>, <a href="SqlNode.html#equalDeep(java.util.List,java.util.List,org.apache.calcite.util.Litmus)">equalDeep</a>, <a href="SqlNode.html#equalsDeep(org.apache.calcite.sql.SqlNode,boolean)">equalsDeep</a>, <a href="SqlNode.html#findValidOptions(org.apache.calcite.sql.validate.SqlValidator,org.apache.calcite.sql.validate.SqlValidatorScope,org.apache.calcite.sql.parser.SqlParserPos,java.util.Collection)">findValidOptions</a>, <a href="SqlNode.html#getParserPosition()">getParserPosition</a>, <a href="SqlNode.html#isA(java.util.Set)">isA</a>, <a href="SqlNode.html#toList()">toList</a>, <a href="SqlNode.html#toList(org.apache.calcite.sql.parser.SqlParserPos)">toList</a>, <a href="SqlNode.html#toSqlString(org.apache.calcite.sql.SqlDialect)">toSqlString</a>, <a href="SqlNode.html#toSqlString(org.apache.calcite.sql.SqlDialect,boolean)">toSqlString</a>, <a href="SqlNode.html#toSqlString(java.util.function.UnaryOperator)">toSqlString</a>, <a href="SqlNode.html#toString()">toString</a>, <a href="SqlNode.html#unparseWithParentheses(org.apache.calcite.sql.SqlWriter,int,int,boolean)">unparseWithParentheses</a>, <a href="SqlNode.html#validateExpr(org.apache.calcite.sql.validate.SqlValidator,org.apache.calcite.sql.validate.SqlValidatorScope)">validateExpr</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#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>
</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="value">
<h3>value</h3>
<div class="member-signature"><span class="modifiers">protected final</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">value</span></div>
<div class="block">The value of this literal. The type of the value must be appropriate for
the typeName, as defined by the <a href="#valueMatchesType(java.lang.Object,org.apache.calcite.sql.type.SqlTypeName)"><code>valueMatchesType(java.lang.Object, org.apache.calcite.sql.type.SqlTypeName)</code></a> method.</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;(java.lang.Object,org.apache.calcite.sql.type.SqlTypeName,org.apache.calcite.sql.parser.SqlParserPos)">
<h3>SqlLiteral</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="element-name">SqlLiteral</span><wbr><span class="parameters">(@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>&nbsp;value,
<a href="type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</span></div>
<div class="block">Creates a <code>SqlLiteral</code>.</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="getTypeName()">
<h3>getTypeName</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a></span>&nbsp;<span class="element-name">getTypeName</span>()</div>
<div class="block">Returns the value of <code>typeName</code>.</div>
</section>
</li>
<li>
<section class="detail" id="valueMatchesType(java.lang.Object,org.apache.calcite.sql.type.SqlTypeName)">
<h3>valueMatchesType</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">valueMatchesType</span><wbr><span class="parameters">(@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>&nbsp;value,
<a href="type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</span></div>
<div class="block">Returns whether value is appropriate for its type. (We have rules about
these things!)</div>
</section>
</li>
<li>
<section class="detail" id="clone(org.apache.calcite.sql.parser.SqlParserPos)">
<h3>clone</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></span>&nbsp;<span class="element-name">clone</span><wbr><span class="parameters">(<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</span></div>
<div class="block"><span class="descfrm-type-label">Description copied from class:&nbsp;<code><a href="SqlNode.html#clone(org.apache.calcite.sql.parser.SqlParserPos)">SqlNode</a></code></span></div>
<div class="block">Clones a SqlNode with a different position.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="SqlNode.html#clone(org.apache.calcite.sql.parser.SqlParserPos)">clone</a></code>&nbsp;in class&nbsp;<code><a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getKind()">
<h3>getKind</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="SqlKind.html" title="enum in org.apache.calcite.sql">SqlKind</a></span>&nbsp;<span class="element-name">getKind</span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from class:&nbsp;<code><a href="SqlNode.html#getKind()">SqlNode</a></code></span></div>
<div class="block">Returns the type of node this is, or
<a href="SqlKind.html#OTHER"><code>SqlKind.OTHER</code></a> if it's nothing special.</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="SqlNode.html#getKind()">getKind</a></code>&nbsp;in class&nbsp;<code><a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></code></dd>
<dt>Returns:</dt>
<dd>a <a href="SqlKind.html" title="enum in org.apache.calcite.sql"><code>SqlKind</code></a> value, never null</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="SqlNode.html#isA(java.util.Set)"><code>SqlNode.isA(java.util.Set&lt;org.apache.calcite.sql.SqlKind&gt;)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getValue()">
<h3>getValue</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">getValue</span>()</div>
<div class="block">Returns the value of this literal.
<p>Try not to use this method! There are so many different kinds of
values, it's better to to let SqlLiteral do whatever it is you want to
do.</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#booleanValue()"><code>booleanValue()</code></a></li>
<li><a href="#symbolValue(java.lang.Class)"><code>symbolValue(Class)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getValueAs(java.lang.Class)">
<h3>getValueAs</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="type-parameters">&lt;T&gt;</span>&nbsp;<span class="return-type">T</span>&nbsp;<span class="element-name">getValueAs</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;T&gt;&nbsp;clazz)</span></div>
<div class="block">Returns the value of this literal as a given Java type.
<p>Which type you may ask for depends on <code>typeName</code>.
You may always ask for the type where we store the value internally
(as defined by <a href="#valueMatchesType(java.lang.Object,org.apache.calcite.sql.type.SqlTypeName)"><code>valueMatchesType(Object, SqlTypeName)</code></a>), but may
ask for other convenient types.
<p>For example, numeric literals' values are stored internally as
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/math/BigDecimal.html" title="class or interface in java.math" class="external-link"><code>BigDecimal</code></a>, but other numeric types such as <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Long.html" title="class or interface in java.lang" class="external-link"><code>Long</code></a> and
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Double.html" title="class or interface in java.lang" class="external-link"><code>Double</code></a> are also allowed.
<p>The result is never null. For the NULL literal, returns
a <a href="../rel/metadata/NullSentinel.html#INSTANCE"><code>NullSentinel.INSTANCE</code></a>.</div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>T</code> - Value type</dd>
<dt>Parameters:</dt>
<dd><code>clazz</code> - Desired value type</dd>
<dt>Returns:</dt>
<dd>Value of the literal in desired type, never null</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/AssertionError.html" title="class or interface in java.lang" class="external-link">AssertionError</a></code> - if the value type is not supported</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="symbolValue_()">
<h3>symbolValue_</h3>
<div class="member-signature"><span class="annotations"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html" title="class or interface in java.lang" class="external-link">@Deprecated</a>
</span><span class="modifiers">public</span>&nbsp;<span class="type-parameters">&lt;E extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Enum.html" title="class or interface in java.lang" class="external-link">Enum</a>&lt;E&gt;&gt;</span>&nbsp;<span class="return-type">@Nullable E</span>&nbsp;<span class="element-name">symbolValue_</span>()</div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated.</span></div>
<div class="block">Returns the value as a symbol.</div>
</section>
</li>
<li>
<section class="detail" id="symbolValue(java.lang.Class)">
<h3>symbolValue</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="type-parameters">&lt;E extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Enum.html" title="class or interface in java.lang" class="external-link">Enum</a>&lt;E&gt;&gt;</span>&nbsp;<span class="return-type">@Nullable E</span>&nbsp;<span class="element-name">symbolValue</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;E&gt;&nbsp;class_)</span></div>
<div class="block">Returns the value as a symbol.</div>
</section>
</li>
<li>
<section class="detail" id="booleanValue()">
<h3>booleanValue</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">booleanValue</span>()</div>
<div class="block">Returns the value as a boolean.</div>
</section>
</li>
<li>
<section class="detail" id="sampleValue(org.apache.calcite.sql.SqlNode)">
<h3>sampleValue</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="SqlSampleSpec.html" title="class in org.apache.calcite.sql">SqlSampleSpec</a></span>&nbsp;<span class="element-name">sampleValue</span><wbr><span class="parameters">(<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&nbsp;node)</span></div>
<div class="block">Extracts the <a href="SqlSampleSpec.html" title="class in org.apache.calcite.sql"><code>SqlSampleSpec</code></a> value from a symbol literal.</div>
<dl class="notes">
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">ClassCastException</a></code> - if the value is not a symbol literal</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="#createSymbol(java.lang.Enum,org.apache.calcite.sql.parser.SqlParserPos)"><code>createSymbol(Enum, SqlParserPos)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="value(org.apache.calcite.sql.SqlNode)">
<h3>value</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">@Nullable <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a></span>&nbsp;<span class="element-name">value</span><wbr><span class="parameters">(<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&nbsp;node)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></span></div>
<div class="block">Extracts the value from a literal.
<p>Cases:
<ul>
<li>If the node is a character literal, a chain of string
literals, or a CAST of a character literal, returns the value as a
<a href="../util/NlsString.html" title="class in org.apache.calcite.util"><code>NlsString</code></a>.
<li>If the node is a numeric literal, or a negated numeric literal,
returns the value as a <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/math/BigDecimal.html" title="class or interface in java.math" class="external-link"><code>BigDecimal</code></a>.
<li>If the node is a <a href="SqlIntervalQualifier.html" title="class in org.apache.calcite.sql"><code>SqlIntervalQualifier</code></a>,
returns its <code>TimeUnitRange</code>.
<li>If the node is INTERVAL_DAY_TIME_ in <a href="type/SqlTypeFamily.html" title="enum in org.apache.calcite.sql.type"><code>SqlTypeFamily</code></a>,
returns its sign multiplied by its millisecond equivalent value
<li>If the node is INTERVAL_YEAR_MONTH_ in <a href="type/SqlTypeFamily.html" title="enum in org.apache.calcite.sql.type"><code>SqlTypeFamily</code></a>,
returns its sign multiplied by its months equivalent value
<li>Otherwise throws <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link"><code>IllegalArgumentException</code></a>.
</ul></div>
<dl class="notes">
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="stringValue(org.apache.calcite.sql.SqlNode)">
<h3>stringValue</h3>
<div class="member-signature"><span class="annotations"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html" title="class or interface in java.lang" class="external-link">@Deprecated</a>
</span><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">stringValue</span><wbr><span class="parameters">(<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&nbsp;node)</span></div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">Use <a href="#value(org.apache.calcite.sql.SqlNode)"><code>value(SqlNode)</code></a></div>
</div>
<div class="block">Extracts the string value from a string literal, a chain of string
literals, or a CAST of a string literal.</div>
</section>
</li>
<li>
<section class="detail" id="unchain(org.apache.calcite.sql.SqlNode)">
<h3>unchain</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></span>&nbsp;<span class="element-name">unchain</span><wbr><span class="parameters">(<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&nbsp;node)</span></div>
<div class="block">Converts a chained string literals into regular literals; returns regular
literals unchanged.</div>
<dl class="notes">
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if <code>node</code> is not a string literal
and cannot be unchained.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="toValue()">
<h3>toValue</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/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">toValue</span>()</div>
<div class="block">For calc program builder - value may be different than <a href="#unparse(org.apache.calcite.sql.SqlWriter,int,int)"><code>unparse(org.apache.calcite.sql.SqlWriter, int, int)</code></a>.
Typical values:
<ul>
<li>Hello, world!</li>
<li>12.34</li>
<li>{null}</li>
<li>1969-04-29</li>
</ul></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>string representation of the value</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="validate(org.apache.calcite.sql.validate.SqlValidator,org.apache.calcite.sql.validate.SqlValidatorScope)">
<h3>validate</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">validate</span><wbr><span class="parameters">(<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)</span></div>
<div class="block"><span class="descfrm-type-label">Description copied from class:&nbsp;<code><a href="SqlNode.html#validate(org.apache.calcite.sql.validate.SqlValidator,org.apache.calcite.sql.validate.SqlValidatorScope)">SqlNode</a></code></span></div>
<div class="block">Validates this node.
<p>The typical implementation of this method will make a callback to the
validator appropriate to the node type and context. The validator has
methods such as <a href="validate/SqlValidator.html#validateLiteral(org.apache.calcite.sql.SqlLiteral)"><code>SqlValidator.validateLiteral(org.apache.calcite.sql.SqlLiteral)</code></a> for these purposes.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="SqlNode.html#validate(org.apache.calcite.sql.validate.SqlValidator,org.apache.calcite.sql.validate.SqlValidatorScope)">validate</a></code>&nbsp;in class&nbsp;<code><a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></code></dd>
<dd><code>scope</code> - Validator</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="accept(org.apache.calcite.sql.util.SqlVisitor)">
<h3>accept</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="type-parameters">&lt;R&gt;</span>&nbsp;<span class="return-type">R</span>&nbsp;<span class="element-name">accept</span><wbr><span class="parameters">(<a href="util/SqlVisitor.html" title="interface in org.apache.calcite.sql.util">SqlVisitor</a>&lt;R&gt;&nbsp;visitor)</span></div>
<div class="block"><span class="descfrm-type-label">Description copied from class:&nbsp;<code><a href="SqlNode.html#accept(org.apache.calcite.sql.util.SqlVisitor)">SqlNode</a></code></span></div>
<div class="block">Accepts a generic visitor.
<p>Implementations of this method in subtypes simply call the appropriate
<code>visit</code> method on the
<a href="util/SqlVisitor.html" title="interface in org.apache.calcite.sql.util"><code>visitor object</code></a>.
<p>The type parameter <code>R</code> must be consistent with the type
parameter of the visitor.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="SqlNode.html#accept(org.apache.calcite.sql.util.SqlVisitor)">accept</a></code>&nbsp;in class&nbsp;<code><a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="equalsDeep(org.apache.calcite.sql.SqlNode,org.apache.calcite.util.Litmus)">
<h3>equalsDeep</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">equalsDeep</span><wbr><span class="parameters">(@Nullable <a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&nbsp;node,
<a href="../util/Litmus.html" title="interface in org.apache.calcite.util">Litmus</a>&nbsp;litmus)</span></div>
<div class="block"><span class="descfrm-type-label">Description copied from class:&nbsp;<code><a href="SqlNode.html#equalsDeep(org.apache.calcite.sql.SqlNode,org.apache.calcite.util.Litmus)">SqlNode</a></code></span></div>
<div class="block">Returns whether this node is structurally equivalent to another node.
Some examples:
<ul>
<li>1 + 2 is structurally equivalent to 1 + 2</li>
<li>1 + 2 + 3 is structurally equivalent to (1 + 2) + 3, but not to 1 +
(2 + 3), because the '+' operator is left-associative</li>
</ul></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="SqlNode.html#equalsDeep(org.apache.calcite.sql.SqlNode,org.apache.calcite.util.Litmus)">equalsDeep</a></code>&nbsp;in class&nbsp;<code><a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getMonotonicity(org.apache.calcite.sql.validate.SqlValidatorScope)">
<h3>getMonotonicity</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="validate/SqlMonotonicity.html" title="enum in org.apache.calcite.sql.validate">SqlMonotonicity</a></span>&nbsp;<span class="element-name">getMonotonicity</span><wbr><span class="parameters">(@Nullable <a href="validate/SqlValidatorScope.html" title="interface in org.apache.calcite.sql.validate">SqlValidatorScope</a>&nbsp;scope)</span></div>
<div class="block"><span class="descfrm-type-label">Description copied from class:&nbsp;<code><a href="SqlNode.html#getMonotonicity(org.apache.calcite.sql.validate.SqlValidatorScope)">SqlNode</a></code></span></div>
<div class="block">Returns whether expression is always ascending, descending or constant.
This property is useful because it allows to safely aggregate infinite
streams of values.
<p>The default implementation returns
<a href="validate/SqlMonotonicity.html#NOT_MONOTONIC"><code>SqlMonotonicity.NOT_MONOTONIC</code></a>.</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="SqlNode.html#getMonotonicity(org.apache.calcite.sql.validate.SqlValidatorScope)">getMonotonicity</a></code>&nbsp;in class&nbsp;<code><a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></code></dd>
<dt>Parameters:</dt>
<dd><code>scope</code> - Scope</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="createNull(org.apache.calcite.sql.parser.SqlParserPos)">
<h3>createNull</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></span>&nbsp;<span class="element-name">createNull</span><wbr><span class="parameters">(<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</span></div>
<div class="block">Creates a NULL literal.
<p>There's no singleton constant for a NULL literal. Instead, nulls must
be instantiated via createNull(), because different instances have
different context-dependent types.</div>
</section>
</li>
<li>
<section class="detail" id="createBoolean(boolean,org.apache.calcite.sql.parser.SqlParserPos)">
<h3>createBoolean</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></span>&nbsp;<span class="element-name">createBoolean</span><wbr><span class="parameters">(boolean&nbsp;b,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</span></div>
<div class="block">Creates a boolean literal.</div>
</section>
</li>
<li>
<section class="detail" id="createUnknown(org.apache.calcite.sql.parser.SqlParserPos)">
<h3>createUnknown</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></span>&nbsp;<span class="element-name">createUnknown</span><wbr><span class="parameters">(<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</span></div>
</section>
</li>
<li>
<section class="detail" id="createSymbol(java.lang.Enum,org.apache.calcite.sql.parser.SqlParserPos)">
<h3>createSymbol</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></span>&nbsp;<span class="element-name">createSymbol</span><wbr><span class="parameters">(@Nullable <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Enum.html" title="class or interface in java.lang" class="external-link">Enum</a>&lt;?&gt;&nbsp;o,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</span></div>
<div class="block">Creates a literal which represents a parser symbol, for example the
<code>TRAILING</code> keyword in the call <code>Trim(TRAILING 'x' FROM
'Hello world!')</code>.</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#symbolValue(java.lang.Class)"><code>symbolValue(Class)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="createSample(org.apache.calcite.sql.SqlSampleSpec,org.apache.calcite.sql.parser.SqlParserPos)">
<h3>createSample</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></span>&nbsp;<span class="element-name">createSample</span><wbr><span class="parameters">(<a href="SqlSampleSpec.html" title="class in org.apache.calcite.sql">SqlSampleSpec</a>&nbsp;sampleSpec,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</span></div>
<div class="block">Creates a literal which represents a sample specification.</div>
</section>
</li>
<li>
<section class="detail" id="equals(java.lang.Object)">
<h3>equals</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">equals</span><wbr><span class="parameters">(@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>&nbsp;obj)</span></div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a></code>&nbsp;in class&nbsp;<code><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></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="hashCode()">
<h3>hashCode</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">hashCode</span>()</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a></code>&nbsp;in class&nbsp;<code><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></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="intValue(boolean)">
<h3>intValue</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">intValue</span><wbr><span class="parameters">(boolean&nbsp;exact)</span></div>
<div class="block">Returns the integer value of this literal.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>exact</code> - Whether the value has to be exact. If true, and the literal
is a fraction (e.g. 3.14), throws. If false, discards the
fractional part of the value.</dd>
<dt>Returns:</dt>
<dd>Integer value of this literal</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="longValue(boolean)">
<h3>longValue</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name">longValue</span><wbr><span class="parameters">(boolean&nbsp;exact)</span></div>
<div class="block">Returns the long value of this literal.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>exact</code> - Whether the value has to be exact. If true, and the literal
is a fraction (e.g. 3.14), throws. If false, discards the
fractional part of the value.</dd>
<dt>Returns:</dt>
<dd>Long value of this literal</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="signum()">
<h3>signum</h3>
<div class="member-signature"><span class="annotations"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html" title="class or interface in java.lang" class="external-link">@Deprecated</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">signum</span>()</div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated.</span></div>
<div class="block">Returns sign of value.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>-1, 0 or 1</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="bigDecimalValue()">
<h3>bigDecimalValue</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/math/BigDecimal.html" title="class or interface in java.math" class="external-link">BigDecimal</a></span>&nbsp;<span class="element-name">bigDecimalValue</span>()</div>
<div class="block">Returns a numeric literal's value as a <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/math/BigDecimal.html" title="class or interface in java.math" class="external-link"><code>BigDecimal</code></a>.</div>
</section>
</li>
<li>
<section class="detail" id="getStringValue()">
<h3>getStringValue</h3>
<div class="member-signature"><span class="annotations"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html" title="class or interface in java.lang" class="external-link">@Deprecated</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">getStringValue</span>()</div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated.</span></div>
</section>
</li>
<li>
<section class="detail" id="unparse(org.apache.calcite.sql.SqlWriter,int,int)">
<h3>unparse</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">unparse</span><wbr><span class="parameters">(<a href="SqlWriter.html" title="interface in org.apache.calcite.sql">SqlWriter</a>&nbsp;writer,
int&nbsp;leftPrec,
int&nbsp;rightPrec)</span></div>
<div class="block"><span class="descfrm-type-label">Description copied from class:&nbsp;<code><a href="SqlNode.html#unparse(org.apache.calcite.sql.SqlWriter,int,int)">SqlNode</a></code></span></div>
<div class="block">Writes a SQL representation of this node to a writer.
<p>The <code>leftPrec</code> and <code>rightPrec</code> parameters give
us enough context to decide whether we need to enclose the expression in
parentheses. For example, we need parentheses around "2 + 3" if preceded
by "5 *". This is because the precedence of the "*" operator is greater
than the precedence of the "+" operator.
<p>The algorithm handles left- and right-associative operators by giving
them slightly different left- and right-precedence.
<p>If <a href="SqlWriter.html#isAlwaysUseParentheses()"><code>SqlWriter.isAlwaysUseParentheses()</code></a> is true, we use
parentheses even when they are not required by the precedence rules.
<p>For the details of this algorithm, see <a href="SqlCall.html#unparse(org.apache.calcite.sql.SqlWriter,int,int)"><code>SqlCall.unparse(org.apache.calcite.sql.SqlWriter, int, int)</code></a>.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="SqlNode.html#unparse(org.apache.calcite.sql.SqlWriter,int,int)">unparse</a></code>&nbsp;in class&nbsp;<code><a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></code></dd>
<dt>Parameters:</dt>
<dd><code>writer</code> - Target writer</dd>
<dd><code>leftPrec</code> - The precedence of the <a href="SqlNode.html" title="class in org.apache.calcite.sql"><code>SqlNode</code></a> immediately
preceding this node in a depth-first scan of the parse
tree</dd>
<dd><code>rightPrec</code> - The precedence of the <a href="SqlNode.html" title="class in org.apache.calcite.sql"><code>SqlNode</code></a> immediately</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="createSqlType(org.apache.calcite.rel.type.RelDataTypeFactory)">
<h3>createSqlType</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></span>&nbsp;<span class="element-name">createSqlType</span><wbr><span class="parameters">(<a href="../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory)</span></div>
</section>
</li>
<li>
<section class="detail" id="createUnknown(java.lang.String,java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)">
<h3>createUnknown</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></span>&nbsp;<span class="element-name">createUnknown</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;tag,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;value,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</span></div>
<div class="block">Creates a literal whose type is unknown until validation time.
The literal has a tag that looks like a type name, but the tag cannot be
resolved until validation time, when we have the mapping from type aliases
to types.
<p>For example,
<blockquote><code>
TIMESTAMP '1969-07-20 22:56:00'
</code></blockquote>
calls <code>createUnknown("TIMESTAMP", "1969-07-20 22:56:00")</code>; at
validate time, we may discover that "TIMESTAMP" maps to the type
"TIMESTAMP WITH LOCAL TIME ZONE".</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>tag</code> - Type name, e.g. "TIMESTAMP", "TIMESTAMP WITH LOCAL TIME ZONE"</dd>
<dd><code>value</code> - String encoding of the value</dd>
<dd><code>pos</code> - Parser position</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="createDate(java.util.Calendar,org.apache.calcite.sql.parser.SqlParserPos)">
<h3>createDate</h3>
<div class="member-signature"><span class="annotations"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html" title="class or interface in java.lang" class="external-link">@Deprecated</a>
</span><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="SqlDateLiteral.html" title="class in org.apache.calcite.sql">SqlDateLiteral</a></span>&nbsp;<span class="element-name">createDate</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Calendar.html" title="class or interface in java.util" class="external-link">Calendar</a>&nbsp;calendar,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</span></div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated.</span></div>
</section>
</li>
<li>
<section class="detail" id="createDate(org.apache.calcite.util.DateString,org.apache.calcite.sql.parser.SqlParserPos)">
<h3>createDate</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="SqlDateLiteral.html" title="class in org.apache.calcite.sql">SqlDateLiteral</a></span>&nbsp;<span class="element-name">createDate</span><wbr><span class="parameters">(<a href="../util/DateString.html" title="class in org.apache.calcite.util">DateString</a>&nbsp;date,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</span></div>
</section>
</li>
<li>
<section class="detail" id="createTimestamp(java.util.Calendar,int,org.apache.calcite.sql.parser.SqlParserPos)">
<h3>createTimestamp</h3>
<div class="member-signature"><span class="annotations"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html" title="class or interface in java.lang" class="external-link">@Deprecated</a>
</span><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="SqlTimestampLiteral.html" title="class in org.apache.calcite.sql">SqlTimestampLiteral</a></span>&nbsp;<span class="element-name">createTimestamp</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Calendar.html" title="class or interface in java.util" class="external-link">Calendar</a>&nbsp;calendar,
int&nbsp;precision,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</span></div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated.</span></div>
</section>
</li>
<li>
<section class="detail" id="createTimestamp(org.apache.calcite.util.TimestampString,int,org.apache.calcite.sql.parser.SqlParserPos)">
<h3>createTimestamp</h3>
<div class="member-signature"><span class="annotations"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html" title="class or interface in java.lang" class="external-link">@Deprecated</a>
</span><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="SqlTimestampLiteral.html" title="class in org.apache.calcite.sql">SqlTimestampLiteral</a></span>&nbsp;<span class="element-name">createTimestamp</span><wbr><span class="parameters">(<a href="../util/TimestampString.html" title="class in org.apache.calcite.util">TimestampString</a>&nbsp;ts,
int&nbsp;precision,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</span></div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated.</span></div>
</section>
</li>
<li>
<section class="detail" id="createTimestamp(org.apache.calcite.sql.type.SqlTypeName,org.apache.calcite.util.TimestampString,int,org.apache.calcite.sql.parser.SqlParserPos)">
<h3>createTimestamp</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="SqlTimestampLiteral.html" title="class in org.apache.calcite.sql">SqlTimestampLiteral</a></span>&nbsp;<span class="element-name">createTimestamp</span><wbr><span class="parameters">(<a href="type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
<a href="../util/TimestampString.html" title="class in org.apache.calcite.util">TimestampString</a>&nbsp;ts,
int&nbsp;precision,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</span></div>
<div class="block">Creates a TIMESTAMP or TIMESTAMP WITH LOCAL TIME ZONE literal.</div>
</section>
</li>
<li>
<section class="detail" id="createTime(java.util.Calendar,int,org.apache.calcite.sql.parser.SqlParserPos)">
<h3>createTime</h3>
<div class="member-signature"><span class="annotations"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html" title="class or interface in java.lang" class="external-link">@Deprecated</a>
</span><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="SqlTimeLiteral.html" title="class in org.apache.calcite.sql">SqlTimeLiteral</a></span>&nbsp;<span class="element-name">createTime</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Calendar.html" title="class or interface in java.util" class="external-link">Calendar</a>&nbsp;calendar,
int&nbsp;precision,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</span></div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated.</span></div>
</section>
</li>
<li>
<section class="detail" id="createTime(org.apache.calcite.util.TimeString,int,org.apache.calcite.sql.parser.SqlParserPos)">
<h3>createTime</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="SqlTimeLiteral.html" title="class in org.apache.calcite.sql">SqlTimeLiteral</a></span>&nbsp;<span class="element-name">createTime</span><wbr><span class="parameters">(<a href="../util/TimeString.html" title="class in org.apache.calcite.util">TimeString</a>&nbsp;t,
int&nbsp;precision,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</span></div>
</section>
</li>
<li>
<section class="detail" id="createInterval(int,java.lang.String,org.apache.calcite.sql.SqlIntervalQualifier,org.apache.calcite.sql.parser.SqlParserPos)">
<h3>createInterval</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="SqlIntervalLiteral.html" title="class in org.apache.calcite.sql">SqlIntervalLiteral</a></span>&nbsp;<span class="element-name">createInterval</span><wbr><span class="parameters">(int&nbsp;sign,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;intervalStr,
<a href="SqlIntervalQualifier.html" title="class in org.apache.calcite.sql">SqlIntervalQualifier</a>&nbsp;intervalQualifier,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</span></div>
<div class="block">Creates an interval literal.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>intervalStr</code> - input string of '1:23:04'</dd>
<dd><code>intervalQualifier</code> - describes the interval type and precision</dd>
<dd><code>pos</code> - Parser position</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="createNegative(org.apache.calcite.sql.SqlNumericLiteral,org.apache.calcite.sql.parser.SqlParserPos)">
<h3>createNegative</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="SqlNumericLiteral.html" title="class in org.apache.calcite.sql">SqlNumericLiteral</a></span>&nbsp;<span class="element-name">createNegative</span><wbr><span class="parameters">(<a href="SqlNumericLiteral.html" title="class in org.apache.calcite.sql">SqlNumericLiteral</a>&nbsp;num,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</span></div>
</section>
</li>
<li>
<section class="detail" id="createExactNumeric(java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)">
<h3>createExactNumeric</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="SqlNumericLiteral.html" title="class in org.apache.calcite.sql">SqlNumericLiteral</a></span>&nbsp;<span class="element-name">createExactNumeric</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;s,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</span></div>
</section>
</li>
<li>
<section class="detail" id="createApproxNumeric(java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)">
<h3>createApproxNumeric</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="SqlNumericLiteral.html" title="class in org.apache.calcite.sql">SqlNumericLiteral</a></span>&nbsp;<span class="element-name">createApproxNumeric</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;s,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</span></div>
</section>
</li>
<li>
<section class="detail" id="createBinaryString(java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)">
<h3>createBinaryString</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="SqlBinaryStringLiteral.html" title="class in org.apache.calcite.sql">SqlBinaryStringLiteral</a></span>&nbsp;<span class="element-name">createBinaryString</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;s,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</span></div>
<div class="block">Creates a literal like X'ABAB'. Although it matters when we derive a type
for this beastie, we don't care at this point whether the number of
hexits is odd or even.</div>
</section>
</li>
<li>
<section class="detail" id="createBinaryString(byte[],org.apache.calcite.sql.parser.SqlParserPos)">
<h3>createBinaryString</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="SqlBinaryStringLiteral.html" title="class in org.apache.calcite.sql">SqlBinaryStringLiteral</a></span>&nbsp;<span class="element-name">createBinaryString</span><wbr><span class="parameters">(byte[]&nbsp;bytes,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</span></div>
<div class="block">Creates a literal like X'ABAB' from an array of bytes.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>bytes</code> - Contents of binary literal</dd>
<dd><code>pos</code> - Parser position</dd>
<dt>Returns:</dt>
<dd>Binary string literal</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="createCharString(java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)">
<h3>createCharString</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="SqlCharStringLiteral.html" title="class in org.apache.calcite.sql">SqlCharStringLiteral</a></span>&nbsp;<span class="element-name">createCharString</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;s,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</span></div>
<div class="block">Creates a string literal in the system character set.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>s</code> - a string (without the sql single quotes)</dd>
<dd><code>pos</code> - Parser position</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="createCharString(java.lang.String,java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)">
<h3>createCharString</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="SqlCharStringLiteral.html" title="class in org.apache.calcite.sql">SqlCharStringLiteral</a></span>&nbsp;<span class="element-name">createCharString</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;s,
@Nullable <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;charSet,
<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</span></div>
<div class="block">Creates a string literal, with optional character-set.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>s</code> - a string (without the sql single quotes)</dd>
<dd><code>charSet</code> - character set name, null means take system default</dd>
<dd><code>pos</code> - Parser position</dd>
<dt>Returns:</dt>
<dd>A string literal</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/charset/UnsupportedCharsetException.html" title="class or interface in java.nio.charset" class="external-link">UnsupportedCharsetException</a></code> - if charSet is not null but there is
no character set with that name in this
environment</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="unescapeUnicode(char)">
<h3>unescapeUnicode</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></span>&nbsp;<span class="element-name">unescapeUnicode</span><wbr><span class="parameters">(char&nbsp;unicodeEscapeChar)</span></div>
<div class="block">Transforms this literal (which must be of type character) into a new one
in which 4-digit Unicode escape sequences have been replaced with the
corresponding Unicode characters.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>unicodeEscapeChar</code> - escape character (e.g. backslash) for Unicode
numeric sequences; 0 implies no transformation</dd>
<dt>Returns:</dt>
<dd>transformed literal</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>