blob: f7bc9bb0bdb738cb177f0eccef670d4341ee800a [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>RexLiteral (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.rex, class: RexLiteral">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var evenRowColor = "even-row-color";
var oddRowColor = "odd-row-color";
var tableTab = "table-tab";
var activeTableTab = "active-table-tab";
var pathtoroot = "../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<div class="about-language"><b>Apache Calcite</b></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html#class">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field-summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.calcite.rex</a></div>
<h1 title="Class RexLiteral" class="title">Class RexLiteral</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="RexNode.html" title="class in org.apache.calcite.rex">org.apache.calcite.rex.RexNode</a>
<div class="inheritance">org.apache.calcite.rex.RexLiteral</div>
</div>
</div>
<section class="class-description" id="class-description">
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">RexLiteral</span>
<span class="extends-implements">extends <a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></span></div>
<div class="block">Constant value in a row-expression.
<p>There are several methods for creating literals in <a href="RexBuilder.html" title="class in org.apache.calcite.rex"><code>RexBuilder</code></a>:
<a href="RexBuilder.html#makeLiteral(boolean)"><code>RexBuilder.makeLiteral(boolean)</code></a> and so forth.</p>
<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="#getValue2()"><code>getValue2()</code></a> and
<code>toJavaString(java.lang.Comparable, org.apache.calcite.sql.type.SqlTypeName, org.apache.calcite.rel.type.RelDataType, org.apache.calcite.rex.RexDigestIncludeType)</code>.</p>
<p>The allowable types and combinations are:</p>
<table>
<caption>Allowable types for RexLiteral instances</caption>
<tr>
<th>TypeName</th>
<th>Meaning</th>
<th>Value type</th>
</tr>
<tr>
<td><a href="../sql/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="../sql/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="../sql/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="../sql/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="../sql/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>;
also <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> (UTC time zone)
and <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Integer.html" title="class or interface in java.lang" class="external-link"><code>Integer</code></a> (days since POSIX epoch)</td>
</tr>
<tr>
<td><a href="../sql/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>;
also <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> (UTC time zone)
and <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Integer.html" title="class or interface in java.lang" class="external-link"><code>Integer</code></a> (milliseconds since midnight)</td>
</tr>
<tr>
<td><a href="../sql/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="../util/TimestampString.html" title="class in org.apache.calcite.util"><code>TimestampString</code></a>;
also <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> (UTC time zone)
and <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> (milliseconds since POSIX epoch)</td>
</tr>
<tr>
<td><a href="../sql/type/SqlTypeName.html#INTERVAL_DAY"><code>SqlTypeName.INTERVAL_DAY</code></a>,
<a href="../sql/type/SqlTypeName.html#INTERVAL_DAY_HOUR"><code>SqlTypeName.INTERVAL_DAY_HOUR</code></a>,
<a href="../sql/type/SqlTypeName.html#INTERVAL_DAY_MINUTE"><code>SqlTypeName.INTERVAL_DAY_MINUTE</code></a>,
<a href="../sql/type/SqlTypeName.html#INTERVAL_DAY_SECOND"><code>SqlTypeName.INTERVAL_DAY_SECOND</code></a>,
<a href="../sql/type/SqlTypeName.html#INTERVAL_HOUR"><code>SqlTypeName.INTERVAL_HOUR</code></a>,
<a href="../sql/type/SqlTypeName.html#INTERVAL_HOUR_MINUTE"><code>SqlTypeName.INTERVAL_HOUR_MINUTE</code></a>,
<a href="../sql/type/SqlTypeName.html#INTERVAL_HOUR_SECOND"><code>SqlTypeName.INTERVAL_HOUR_SECOND</code></a>,
<a href="../sql/type/SqlTypeName.html#INTERVAL_MINUTE"><code>SqlTypeName.INTERVAL_MINUTE</code></a>,
<a href="../sql/type/SqlTypeName.html#INTERVAL_MINUTE_SECOND"><code>SqlTypeName.INTERVAL_MINUTE_SECOND</code></a>,
<a href="../sql/type/SqlTypeName.html#INTERVAL_SECOND"><code>SqlTypeName.INTERVAL_SECOND</code></a></td>
<td>Interval, for example <code>INTERVAL '4:3:2' HOUR TO SECOND</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>;
also <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> (milliseconds)</td>
</tr>
<tr>
<td><a href="../sql/type/SqlTypeName.html#INTERVAL_YEAR"><code>SqlTypeName.INTERVAL_YEAR</code></a>,
<a href="../sql/type/SqlTypeName.html#INTERVAL_YEAR_MONTH"><code>SqlTypeName.INTERVAL_YEAR_MONTH</code></a>,
<a href="../sql/type/SqlTypeName.html#INTERVAL_MONTH"><code>SqlTypeName.INTERVAL_MONTH</code></a></td>
<td>Interval, for example <code>INTERVAL '2-3' YEAR TO MONTH</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>;
also <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Integer.html" title="class or interface in java.lang" class="external-link"><code>Integer</code></a> (months)</td>
</tr>
<tr>
<td><a href="../sql/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>;
also <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"><code>String</code></a></td>
</tr>
<tr>
<td><a href="../sql/type/SqlTypeName.html#BINARY"><code>SqlTypeName.BINARY</code></a></td>
<td>Binary constant, for example <code>X'7F34'</code>. (The number of hexits
must be even; see above.) These constants are always BINARY, never
VARBINARY.</td>
<td><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link"><code>ByteBuffer</code></a>;
also <code>byte[]</code></td>
</tr>
<tr>
<td><a href="../sql/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 flag,
such as the LEADING flag in a call to the function <code>
TRIM([LEADING|TRAILING|BOTH] chars FROM string)</code>.</td>
<td>An enum class</td>
</tr>
</table></div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="inherited-list">
<h3 id="fields-inherited-from-class-org.apache.calcite.rex.RexNode">Fields inherited from class&nbsp;org.apache.calcite.rex.<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></h3>
<code><a href="RexNode.html#digest">digest</a></code></div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>&lt;R,<wbr>
P&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.rex.RexBiVisitor,P)" class="member-name-link">accept</a><wbr>(<a href="RexBiVisitor.html" title="interface in org.apache.calcite.rex">RexBiVisitor</a>&lt;R,<wbr>P&gt;&nbsp;visitor,
P&nbsp;arg)</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 visitor with a payload, dispatching to the right overloaded
<a href="RexBiVisitor.html#visitInputRef(org.apache.calcite.rex.RexInputRef,P)"><code>RexBiVisitor.visitInputRef(RexInputRef, Object)</code></a> visitXxx} method.</div>
</div>
<div class="col-first odd-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 odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#accept(org.apache.calcite.rex.RexVisitor)" class="member-name-link">accept</a><wbr>(<a href="RexVisitor.html" title="interface in org.apache.calcite.rex">RexVisitor</a>&lt;R&gt;&nbsp;visitor)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Accepts a visitor, dispatching to the right overloaded
<a href="RexVisitor.html#visitInputRef(org.apache.calcite.rex.RexInputRef)"><code>visitXxx</code></a> method.</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="#booleanValue(org.apache.calcite.rex.RexNode)" class="member-name-link">booleanValue</a><wbr>(<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;node)</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-tab2 method-summary-table-tab4"><code>final <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#computeDigest(org.apache.calcite.rex.RexDigestIncludeType)" class="member-name-link">computeDigest</a><wbr>(<a href="RexDigestIncludeType.html" title="enum in org.apache.calcite.rex">RexDigestIncludeType</a>&nbsp;includeType)</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 string which concisely describes the definition of this
rex literal.</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="#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"></div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static @PolyNull <a href="RexLiteral.html" title="class in org.apache.calcite.rex">RexLiteral</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#fromJdbcString(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.sql.type.SqlTypeName,java.lang.String)" class="member-name-link">fromJdbcString</a><wbr>(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type,
<a href="../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
@PolyNull <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;literal)</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 Jdbc string into a RexLiteral.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../sql/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 kind of node this is.</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="#getType()" class="member-name-link">getType</a>()</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-tab2 method-summary-table-tab4"><code><a href="../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a></code></div>
<div class="col-second even-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 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>@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-tab2 method-summary-table-tab4"><code><a href="#getValue()" class="member-name-link">getValue</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 this literal.</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="#getValue2()" class="member-name-link">getValue2</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, in the form that the calculator
program builder wants it.</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/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getValue3()" class="member-name-link">getValue3</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 this literal, in the form that the rex-to-lix
translator wants it.</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/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getValue4()" class="member-name-link">getValue4</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, in the form that <a href="RexInterpreter.html" title="class in org.apache.calcite.rex"><code>RexInterpreter</code></a>
wants it.</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;@Nullable 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 an instance of the specified class.</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"></div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#intValue(org.apache.calcite.rex.RexNode)" class="member-name-link">intValue</a><wbr>(<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;node)</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="#isAlwaysFalse()" class="member-name-link">isAlwaysFalse</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 whether this expression always returns false.</div>
</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="#isAlwaysTrue()" class="member-name-link">isAlwaysTrue</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 whether this expression always returns true.</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="#isNull()" class="member-name-link">isNull</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 whether this literal's value is null.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#isNullLiteral(org.apache.calcite.rex.RexNode)" class="member-name-link">isNullLiteral</a><wbr>(<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;node)</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>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#printAsJava(java.io.PrintWriter)" class="member-name-link">printAsJava</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/PrintWriter.html" title="class or interface in java.io" class="external-link">PrintWriter</a>&nbsp;pw)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Prints the value this literal as a Java string constant.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="../sql/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-tab1 method-summary-table-tab4"><code><a href="#strictTypeName(org.apache.calcite.rel.type.RelDataType)" class="member-name-link">strictTypeName</a><wbr>(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns the strict literal type for a given type.</div>
</div>
<div class="col-first even-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/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-tab1 method-summary-table-tab4"><code><a href="#stringValue(org.apache.calcite.rex.RexNode)" class="member-name-link">stringValue</a><wbr>(<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;node)</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 boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#validConstant(java.lang.Object,org.apache.calcite.util.Litmus)" class="member-name-link">validConstant</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;o,
<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-tab1 method-summary-table-tab4">
<div class="block">Returns whether a value is valid as a constant value, using the same
criteria as <a href="#valueMatchesType(java.lang.Comparable,org.apache.calcite.sql.type.SqlTypeName,boolean)"><code>valueMatchesType(java.lang.Comparable, org.apache.calcite.sql.type.SqlTypeName, boolean)</code></a>.</div>
</div>
<div class="col-first even-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 even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#value(org.apache.calcite.rex.RexNode)" class="member-name-link">value</a><wbr>(<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;node)</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 boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#valueMatchesType(java.lang.Comparable,org.apache.calcite.sql.type.SqlTypeName,boolean)" class="member-name-link">valueMatchesType</a><wbr>(@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>&nbsp;value,
<a href="../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
boolean&nbsp;strict)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns whether a value is appropriate for its type.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-org.apache.calcite.rex.RexNode">Methods inherited from class&nbsp;org.apache.calcite.rex.<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></h3>
<code><a href="RexNode.html#isA(java.util.Collection)">isA</a>, <a href="RexNode.html#isA(org.apache.calcite.sql.SqlKind)">isA</a>, <a href="RexNode.html#nodeCount()">nodeCount</a>, <a href="RexNode.html#toString()">toString</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="computeDigest(org.apache.calcite.rex.RexDigestIncludeType)">
<h3>computeDigest</h3>
<div class="member-signature"><span class="annotations">@RequiresNonNull({"typeName","type"})
</span><span class="modifiers">public final</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">computeDigest</span><wbr><span class="parameters">(@UnknownInitialization RexLiteral&nbsp;this,
<a href="RexDigestIncludeType.html" title="enum in org.apache.calcite.rex">RexDigestIncludeType</a>&nbsp;includeType)</span></div>
<div class="block">Returns a string which concisely describes the definition of this
rex literal. Two literals are equivalent if and only if their digests are the same.
<p>The digest does not contain the expression's identity, but does include the identity
of children.
<p>Technically speaking 1:INT differs from 1:FLOAT, so we need data type in the literal's
digest, however we want to avoid extra verbosity of the <a href="../rel/RelNode.html#getDigest()"><code>RelNode.getDigest()</code></a> for
readability purposes, so we omit type info in certain cases.
For instance, 1:INT becomes 1 (INT is implied by default), however 1:BIGINT always holds
the type
<p>Here's a non-exhaustive list of the "well known cases":
<ul><li>Hide "NOT NULL" for not null literals
<li>Hide INTEGER, BOOLEAN, SYMBOL, TIME(0), TIMESTAMP(0), DATE(0) types
<li>Hide collation when it matches IMPLICIT/COERCIBLE
<li>Hide charset when it matches default
<li>Hide CHAR(xx) when literal length is equal to the precision of the type.
In other words, use 'Bob' instead of 'Bob':CHAR(3)
<li>Hide BOOL for AND/OR arguments. In other words, AND(true, null) means
null is BOOL.
<li>Hide types for literals in simple binary operations (e.g. +, -, *, /,
comparison) when type of the other argument is clear.
See <a href="RexCall.html#computeDigest(boolean)"><code>RexCall.computeDigest(boolean)</code></a>
For instance: =(true. null) means null is BOOL. =($0, null) means the type
of null matches the type of $0.
</ul></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>includeType</code> - whether the digest should include type or not</dd>
<dt>Returns:</dt>
<dd>digest</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="valueMatchesType(java.lang.Comparable,org.apache.calcite.sql.type.SqlTypeName,boolean)">
<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/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&nbsp;value,
<a href="../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
boolean&nbsp;strict)</span></div>
<div class="block">Returns whether a value is appropriate for its type. (We have rules about
these things!)</div>
</section>
</li>
<li>
<section class="detail" id="strictTypeName(org.apache.calcite.rel.type.RelDataType)">
<h3>strictTypeName</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a></span>&nbsp;<span class="element-name">strictTypeName</span><wbr><span class="parameters">(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type)</span></div>
<div class="block">Returns the strict literal type for a given type. The rules should keep
sync with what <a href="RexBuilder.html#makeLiteral(java.lang.Comparable,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.sql.type.SqlTypeName)"><code>RexBuilder.makeLiteral(java.lang.Comparable, org.apache.calcite.rel.type.RelDataType, org.apache.calcite.sql.type.SqlTypeName)</code></a> defines.</div>
</section>
</li>
<li>
<section class="detail" id="validConstant(java.lang.Object,org.apache.calcite.util.Litmus)">
<h3>validConstant</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">validConstant</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;o,
<a href="../util/Litmus.html" title="interface in org.apache.calcite.util">Litmus</a>&nbsp;litmus)</span></div>
<div class="block">Returns whether a value is valid as a constant value, using the same
criteria as <a href="#valueMatchesType(java.lang.Comparable,org.apache.calcite.sql.type.SqlTypeName,boolean)"><code>valueMatchesType(java.lang.Comparable, org.apache.calcite.sql.type.SqlTypeName, boolean)</code></a>.</div>
</section>
</li>
<li>
<section class="detail" id="printAsJava(java.io.PrintWriter)">
<h3>printAsJava</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">printAsJava</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/PrintWriter.html" title="class or interface in java.io" class="external-link">PrintWriter</a>&nbsp;pw)</span></div>
<div class="block">Prints the value this literal as a Java string constant.</div>
</section>
</li>
<li>
<section class="detail" id="fromJdbcString(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.sql.type.SqlTypeName,java.lang.String)">
<h3>fromJdbcString</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">@PolyNull <a href="RexLiteral.html" title="class in org.apache.calcite.rex">RexLiteral</a></span>&nbsp;<span class="element-name">fromJdbcString</span><wbr><span class="parameters">(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type,
<a href="../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
@PolyNull <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;literal)</span></div>
<div class="block">Converts a Jdbc string into a RexLiteral. This method accepts a string,
as returned by the Jdbc method ResultSet.getString(), and restores the
string into an equivalent RexLiteral. It allows one to use Jdbc strings
as a common format for data.
<p>Returns null if and only if <code>literal</code> is null.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>type</code> - data type of literal to be read</dd>
<dd><code>typeName</code> - type family of literal</dd>
<dd><code>literal</code> - the (non-SQL encoded) string representation, as returned
by the Jdbc call to return a column as a string</dd>
<dt>Returns:</dt>
<dd>a typed RexLiteral, or null</dd>
</dl>
</section>
</li>
<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="../sql/type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a></span>&nbsp;<span class="element-name">getTypeName</span>()</div>
</section>
</li>
<li>
<section class="detail" id="getType()">
<h3>getType</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">getType</span>()</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="RexNode.html#getType()">getType</a></code>&nbsp;in class&nbsp;<code><a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</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="../sql/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="RexNode.html#getKind()">RexNode</a></code></span></div>
<div class="block">Returns the kind of node this is.</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="RexNode.html#getKind()">getKind</a></code>&nbsp;in class&nbsp;<code><a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></code></dd>
<dt>Returns:</dt>
<dd>Node kind, never null</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="isNull()">
<h3>isNull</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isNull</span>()</div>
<div class="block">Returns whether this literal's value is null.</div>
</section>
</li>
<li>
<section class="detail" id="getValue()">
<h3>getValue</h3>
<div class="member-signature"><span class="annotations">@Pure
</span><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/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a></span>&nbsp;<span class="element-name">getValue</span>()</div>
<div class="block">Returns the value of this literal.
<p>For backwards compatibility, returns DATE. TIME and TIMESTAMP as a
<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> value in UTC time zone.</div>
</section>
</li>
<li>
<section class="detail" id="getValue2()">
<h3>getValue2</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">getValue2</span>()</div>
<div class="block">Returns the value of this literal, in the form that the calculator
program builder wants it.</div>
</section>
</li>
<li>
<section class="detail" id="getValue3()">
<h3>getValue3</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">getValue3</span>()</div>
<div class="block">Returns the value of this literal, in the form that the rex-to-lix
translator wants it.</div>
</section>
</li>
<li>
<section class="detail" id="getValue4()">
<h3>getValue4</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/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a></span>&nbsp;<span class="element-name">getValue4</span>()</div>
<div class="block">Returns the value of this literal, in the form that <a href="RexInterpreter.html" title="class in org.apache.calcite.rex"><code>RexInterpreter</code></a>
wants it.</div>
</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">@Nullable 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 an instance of the specified class.
<p>The following SQL types allow more than one form:
<ul>
<li>CHAR as <a href="../util/NlsString.html" title="class in org.apache.calcite.util"><code>NlsString</code></a> or <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"><code>String</code></a>
<li>TIME as <a href="../util/TimeString.html" title="class in org.apache.calcite.util"><code>TimeString</code></a>,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Integer.html" title="class or interface in java.lang" class="external-link"><code>Integer</code></a> (milliseconds since midnight),
<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> (in UTC)
<li>DATE as <a href="../util/DateString.html" title="class in org.apache.calcite.util"><code>DateString</code></a>,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Integer.html" title="class or interface in java.lang" class="external-link"><code>Integer</code></a> (days since 1970-01-01),
<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>
<li>TIMESTAMP as <a href="../util/TimestampString.html" title="class in org.apache.calcite.util"><code>TimestampString</code></a>,
<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> (milliseconds since 1970-01-01 00:00:00),
<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>
<li>DECIMAL 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> or <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>
</ul>
<p>Called with <code>clazz</code> = <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"><code>Comparable</code></a>, returns the value in
its native form.</div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>T</code> - Return type</dd>
<dt>Parameters:</dt>
<dd><code>clazz</code> - Desired return type</dd>
<dt>Returns:</dt>
<dd>Value of this literal in the desired type</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="booleanValue(org.apache.calcite.rex.RexNode)">
<h3>booleanValue</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">booleanValue</span><wbr><span class="parameters">(<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;node)</span></div>
</section>
</li>
<li>
<section class="detail" id="isAlwaysTrue()">
<h3>isAlwaysTrue</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isAlwaysTrue</span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from class:&nbsp;<code><a href="RexNode.html#isAlwaysTrue()">RexNode</a></code></span></div>
<div class="block">Returns whether this expression always returns true. (Such as if this
expression is equal to the literal <code>TRUE</code>.)</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="RexNode.html#isAlwaysTrue()">isAlwaysTrue</a></code>&nbsp;in class&nbsp;<code><a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="isAlwaysFalse()">
<h3>isAlwaysFalse</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isAlwaysFalse</span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from class:&nbsp;<code><a href="RexNode.html#isAlwaysFalse()">RexNode</a></code></span></div>
<div class="block">Returns whether this expression always returns false. (Such as if this
expression is equal to the literal <code>FALSE</code>.)</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="RexNode.html#isAlwaysFalse()">isAlwaysFalse</a></code>&nbsp;in class&nbsp;<code><a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></code></dd>
</dl>
</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>
<div class="block"><span class="descfrm-type-label">Description copied from class:&nbsp;<code><a href="RexNode.html#equals(java.lang.Object)">RexNode</a></code></span></div>
<div class="block">
<p>Every node must implement <a href="RexNode.html#equals(java.lang.Object)"><code>RexNode.equals(java.lang.Object)</code></a> based on its content</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="RexNode.html#equals(java.lang.Object)">equals</a></code>&nbsp;in class&nbsp;<code><a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</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>
<div class="block"><span class="descfrm-type-label">Description copied from class:&nbsp;<code><a href="RexNode.html#hashCode()">RexNode</a></code></span></div>
<div class="block">
<p>Every node must implement <a href="RexNode.html#hashCode()"><code>RexNode.hashCode()</code></a> consistent with
<a href="RexNode.html#equals(java.lang.Object)"><code>RexNode.equals(java.lang.Object)</code></a></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="RexNode.html#hashCode()">hashCode</a></code>&nbsp;in class&nbsp;<code><a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="value(org.apache.calcite.rex.RexNode)">
<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="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;node)</span></div>
</section>
</li>
<li>
<section class="detail" id="intValue(org.apache.calcite.rex.RexNode)">
<h3>intValue</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">intValue</span><wbr><span class="parameters">(<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;node)</span></div>
</section>
</li>
<li>
<section class="detail" id="stringValue(org.apache.calcite.rex.RexNode)">
<h3>stringValue</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/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="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;node)</span></div>
</section>
</li>
<li>
<section class="detail" id="isNullLiteral(org.apache.calcite.rex.RexNode)">
<h3>isNullLiteral</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isNullLiteral</span><wbr><span class="parameters">(<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;node)</span></div>
</section>
</li>
<li>
<section class="detail" id="accept(org.apache.calcite.rex.RexVisitor)">
<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="RexVisitor.html" title="interface in org.apache.calcite.rex">RexVisitor</a>&lt;R&gt;&nbsp;visitor)</span></div>
<div class="block"><span class="descfrm-type-label">Description copied from class:&nbsp;<code><a href="RexNode.html#accept(org.apache.calcite.rex.RexVisitor)">RexNode</a></code></span></div>
<div class="block">Accepts a visitor, dispatching to the right overloaded
<a href="RexVisitor.html#visitInputRef(org.apache.calcite.rex.RexInputRef)"><code>visitXxx</code></a> method.
<p>Also see <a href="RexUtil.html#apply(org.apache.calcite.rex.RexVisitor,java.util.List,org.apache.calcite.rex.RexNode)"><code>RexUtil.apply(RexVisitor, java.util.List, RexNode)</code></a>,
which applies a visitor to several expressions simultaneously.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="RexNode.html#accept(org.apache.calcite.rex.RexVisitor)">accept</a></code>&nbsp;in class&nbsp;<code><a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="accept(org.apache.calcite.rex.RexBiVisitor,P)">
<h3 id="accept(org.apache.calcite.rex.RexBiVisitor,java.lang.Object)">accept</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="type-parameters">&lt;R,<wbr>
P&gt;</span>&nbsp;<span class="return-type">R</span>&nbsp;<span class="element-name">accept</span><wbr><span class="parameters">(<a href="RexBiVisitor.html" title="interface in org.apache.calcite.rex">RexBiVisitor</a>&lt;R,<wbr>P&gt;&nbsp;visitor,
P&nbsp;arg)</span></div>
<div class="block"><span class="descfrm-type-label">Description copied from class:&nbsp;<code><a href="RexNode.html#accept(org.apache.calcite.rex.RexBiVisitor,P)">RexNode</a></code></span></div>
<div class="block">Accepts a visitor with a payload, dispatching to the right overloaded
<a href="RexBiVisitor.html#visitInputRef(org.apache.calcite.rex.RexInputRef,P)"><code>RexBiVisitor.visitInputRef(RexInputRef, Object)</code></a> visitXxx} method.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="RexNode.html#accept(org.apache.calcite.rex.RexBiVisitor,P)">accept</a></code>&nbsp;in class&nbsp;<code><a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></code></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>