| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <title>SqlUtil (Apache Calcite calcite API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="description" content="declaration: package: org.apache.calcite.sql, class: SqlUtil"> |
| <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.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../script-dir/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../../../script-dir/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../../../script-dir/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../../../script-dir/jquery-3.4.1.js"></script> |
| <script type="text/javascript" src="../../../../script-dir/jquery-ui.js"></script> |
| </head> |
| <body class="class-declaration"> |
| <script type="text/javascript">var data = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9,"i28":9,"i29":9,"i30":41,"i31":9,"i32":9,"i33":9}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| var pathtoroot = "../../../../"; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <div class="flexBox"> |
| <header role="banner" class="flexHeader"> |
| <nav role="navigation"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a id="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage"><b>Apache Calcite</b></div> |
| </div> |
| <div class="subNav"> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <div class="navListSearch"><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </div> |
| </div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <div class="skipNav"><a id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| </nav> |
| </header> |
| <div class="flexContent"> |
| <main role="main"> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">org.apache.calcite.sql</a></div> |
| <h1 title="Class SqlUtil" class="title">Class SqlUtil</h1> |
| </div> |
| <div class="contentContainer"> |
| <div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">java.lang.Object</a> |
| <div class="inheritance">org.apache.calcite.sql.SqlUtil</div> |
| </div> |
| <section class="description"> |
| <hr> |
| <pre>public abstract class <span class="typeNameLabel">SqlUtil</span> |
| extends <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></pre> |
| <div class="block">Contains utility functions related to SQL parsing, all static.</div> |
| </section> |
| <section class="summary"> |
| <ul class="blockList"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <li class="blockList"> |
| <section class="nestedClassSummary"><a id="nested.class.summary"> |
| <!-- --> |
| </a> |
| <h2>Nested Class Summary</h2> |
| <div class="memberSummary"> |
| <table> |
| <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> |
| <thead> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Class</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SqlUtil.DatabaseMetaDataInvocationHandler.html" title="class in org.apache.calcite.sql">SqlUtil.DatabaseMetaDataInvocationHandler</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Handles particular <a href="https://docs.oracle.com/javase/9/docs/api/java/sql/DatabaseMetaData.html?is-external=true" title="class or interface in java.sql" class="externalLink"><code>DatabaseMetaData</code></a> methods; invocations of other |
| methods will fall through to the base class, |
| <a href="../util/BarfingInvocationHandler.html" title="class in org.apache.calcite.util"><code>BarfingInvocationHandler</code></a>, which will throw |
| an error.</div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </section> |
| </li> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <li class="blockList"> |
| <section class="constructorSummary"><a id="constructor.summary"> |
| <!-- --> |
| </a> |
| <h2>Constructor Summary</h2> |
| <div class="memberSummary"> |
| <table> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <thead> |
| <tr> |
| <th class="colFirst" scope="col">Constructor</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr class="altColor"> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">SqlUtil</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </section> |
| </li> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <li class="blockList"> |
| <section class="methodSummary"><a id="method.summary"> |
| <!-- --> |
| </a> |
| <h2>Method Summary</h2> |
| <div class="memberSummary"> |
| <div role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="memberSummary_tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="activeTableTab">All Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t1" class="tableTab" onclick="show(1);">Static Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="tableTab" onclick="show(8);">Concrete Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t6" class="tableTab" onclick="show(32);">Deprecated Methods</button></div> |
| <div id="memberSummary_tabpanel" role="tabpanel"> |
| <table aria-labelledby="t0"> |
| <thead> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr class="altColor" id="i0"> |
| <td class="colFirst"><code>static <a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#andExpressions(org.apache.calcite.sql.SqlNode,org.apache.calcite.sql.SqlNode)">andExpressions</a></span>​(@Nullable <a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node1, |
| <a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node2)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the AND of two expressions.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i1"> |
| <td class="colFirst"><code>static <a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#attachRelHint(org.apache.calcite.rel.hint.HintStrategyTable,java.util.List,org.apache.calcite.rel.hint.Hintable)">attachRelHint</a></span>​(<a href="../rel/hint/HintStrategyTable.html" title="class in org.apache.calcite.rel.hint">HintStrategyTable</a> hintStrategies, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="../rel/hint/RelHint.html" title="class in org.apache.calcite.rel.hint">RelHint</a>> hints, |
| <a href="../rel/hint/Hintable.html" title="interface in org.apache.calcite.rel.hint">Hintable</a> rel)</code></th> |
| <td class="colLast"> |
| <div class="block">Attach the <code>hints</code> to <code>rel</code> with specified hint strategies.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i2"> |
| <td class="colFirst"><code>static <a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#concatenateLiterals(java.util.List)">concatenateLiterals</a></span>​(<a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a>> lits)</code></th> |
| <td class="colLast"> |
| <div class="block">Concatenates string literals.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i3"> |
| <td class="colFirst"><code>static <a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createCall(org.apache.calcite.sql.SqlOperator,org.apache.calcite.sql.parser.SqlParserPos,java.util.List)">createCall</a></span>​(<a href="SqlOperator.html" title="class in org.apache.calcite.sql">SqlOperator</a> op, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>> operands)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a call to an operator.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i4"> |
| <td class="colFirst"><code>static <a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createNlsStringType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.util.NlsString)">createNlsStringType</a></span>​(<a href="../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a> typeFactory, |
| <a href="../util/NlsString.html" title="class in org.apache.calcite.util">NlsString</a> str)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates the type of an <a href="../util/NlsString.html" title="class in org.apache.calcite.util"><code>NlsString</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i5"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#deriveAliasFromOrdinal(int)">deriveAliasFromOrdinal</a></span>​(int ordinal)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor" id="i6"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAliasedSignature(org.apache.calcite.sql.SqlOperator,java.lang.String,java.util.List)">getAliasedSignature</a></span>​(<a href="SqlOperator.html" title="class in org.apache.calcite.sql">SqlOperator</a> op, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> opName, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><?> typeList)</code></th> |
| <td class="colLast"> |
| <div class="block">Constructs an operator signature from a type list, substituting an alias |
| for the operator name.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i7"> |
| <td class="colFirst"><code>static com.google.common.collect.ImmutableList<<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAncestry(org.apache.calcite.sql.SqlNode,java.util.function.Predicate,java.util.function.Predicate)">getAncestry</a></span>​(<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> root, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/function/Predicate.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Predicate</a><<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>> predicate, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/function/Predicate.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Predicate</a><<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>> postPredicate)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a list of ancestors of <code>predicate</code> within a given |
| <code>SqlNode</code> tree.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i8"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/9/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset" class="externalLink">Charset</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCharset(java.lang.String)">getCharset</a></span>​(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> charsetName)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the Java-level <a href="https://docs.oracle.com/javase/9/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset" class="externalLink"><code>Charset</code></a> based on given SQL-level name.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i9"> |
| <td class="colFirst"><code>static <a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getFromNode(org.apache.calcite.sql.SqlSelect,int)">getFromNode</a></span>​(<a href="SqlSelect.html" title="class in org.apache.calcite.sql">SqlSelect</a> query, |
| int ordinal)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the <code>n</code>th (0-based) input to a join expression.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i10"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getOperatorSignature(org.apache.calcite.sql.SqlOperator,java.util.List)">getOperatorSignature</a></span>​(<a href="SqlOperator.html" title="class in org.apache.calcite.sql">SqlOperator</a> op, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><?> typeList)</code></th> |
| <td class="colLast"> |
| <div class="block">Constructs an operator signature from a type list.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i11"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="../rel/hint/RelHint.html" title="class in org.apache.calcite.rel.hint">RelHint</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRelHint(org.apache.calcite.rel.hint.HintStrategyTable,org.apache.calcite.sql.SqlNodeList)">getRelHint</a></span>​(<a href="../rel/hint/HintStrategyTable.html" title="class in org.apache.calcite.rel.hint">HintStrategyTable</a> hintStrategies, |
| @Nullable <a href="SqlNodeList.html" title="class in org.apache.calcite.sql">SqlNodeList</a> sqlHints)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns an immutable list of <a href="../rel/hint/RelHint.html" title="class in org.apache.calcite.rel.hint"><code>RelHint</code></a> from sql hints, with a given |
| inherit path from the root node.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i12"> |
| <td class="colFirst"><code>static <a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSelectListItem(org.apache.calcite.sql.SqlNode,int)">getSelectListItem</a></span>​(<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> query, |
| int i)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the <code>i</code>th select-list item of a query.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i13"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isCallTo(org.apache.calcite.sql.SqlNode,org.apache.calcite.sql.SqlOperator)">isCallTo</a></span>​(<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node, |
| <a href="SqlOperator.html" title="class in org.apache.calcite.sql">SqlOperator</a> operator)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns whether a <a href="SqlNode.html" title="class in org.apache.calcite.sql"><code>node</code></a> is a <a href="SqlCall.html" title="class in org.apache.calcite.sql"><code>call</code></a> to a |
| given <a href="SqlOperator.html" title="class in org.apache.calcite.sql"><code>operator</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i14"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isLiteral(org.apache.calcite.sql.SqlNode)">isLiteral</a></span>​(<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns whether a node is a literal.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i15"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isLiteral(org.apache.calcite.sql.SqlNode,boolean)">isLiteral</a></span>​(<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node, |
| boolean allowCast)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns whether a node is a literal.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i16"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isLiteralChain(org.apache.calcite.sql.SqlNode)">isLiteralChain</a></span>​(<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns whether a node is a literal chain which is used to represent a |
| continued string literal.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i17"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isNull(org.apache.calcite.sql.SqlNode)">isNull</a></span>​(<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns whether a node represents the NULL value or a series of nested |
| <code>CAST(NULL AS type)</code> calls.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i18"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isNullLiteral(org.apache.calcite.sql.SqlNode,boolean)">isNullLiteral</a></span>​(@Nullable <a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node, |
| boolean allowCast)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns whether a node represents the NULL value.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i19"> |
| <td class="colFirst"><code>static @Nullable <a href="SqlOperator.html" title="class in org.apache.calcite.sql">SqlOperator</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#lookupRoutine(org.apache.calcite.sql.SqlOperatorTable,org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.sql.SqlIdentifier,java.util.List,java.util.List,org.apache.calcite.sql.SqlFunctionCategory,org.apache.calcite.sql.SqlSyntax,org.apache.calcite.sql.SqlKind,org.apache.calcite.sql.validate.SqlNameMatcher,boolean)">lookupRoutine</a></span>​(<a href="SqlOperatorTable.html" title="interface in org.apache.calcite.sql">SqlOperatorTable</a> opTab, |
| <a href="../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a> typeFactory, |
| <a href="SqlIdentifier.html" title="class in org.apache.calcite.sql">SqlIdentifier</a> funcName, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>> argTypes, |
| @Nullable <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>> argNames, |
| @Nullable <a href="SqlFunctionCategory.html" title="enum in org.apache.calcite.sql">SqlFunctionCategory</a> category, |
| <a href="SqlSyntax.html" title="enum in org.apache.calcite.sql">SqlSyntax</a> syntax, |
| <a href="SqlKind.html" title="enum in org.apache.calcite.sql">SqlKind</a> sqlKind, |
| <a href="validate/SqlNameMatcher.html" title="interface in org.apache.calcite.sql.validate">SqlNameMatcher</a> nameMatcher, |
| boolean coerce)</code></th> |
| <td class="colLast"> |
| <div class="block">Looks up a (possibly overloaded) routine based on name and argument |
| types.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i20"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/9/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util" class="externalLink">Iterator</a><<a href="SqlOperator.html" title="class in org.apache.calcite.sql">SqlOperator</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#lookupSubjectRoutines(org.apache.calcite.sql.SqlOperatorTable,org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.sql.SqlIdentifier,java.util.List,java.util.List,org.apache.calcite.sql.SqlSyntax,org.apache.calcite.sql.SqlKind,org.apache.calcite.sql.SqlFunctionCategory,org.apache.calcite.sql.validate.SqlNameMatcher,boolean)">lookupSubjectRoutines</a></span>​(<a href="SqlOperatorTable.html" title="interface in org.apache.calcite.sql">SqlOperatorTable</a> opTab, |
| <a href="../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a> typeFactory, |
| <a href="SqlIdentifier.html" title="class in org.apache.calcite.sql">SqlIdentifier</a> funcName, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>> argTypes, |
| @Nullable <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>> argNames, |
| <a href="SqlSyntax.html" title="enum in org.apache.calcite.sql">SqlSyntax</a> sqlSyntax, |
| <a href="SqlKind.html" title="enum in org.apache.calcite.sql">SqlKind</a> sqlKind, |
| @Nullable <a href="SqlFunctionCategory.html" title="enum in org.apache.calcite.sql">SqlFunctionCategory</a> category, |
| <a href="validate/SqlNameMatcher.html" title="interface in org.apache.calcite.sql.validate">SqlNameMatcher</a> nameMatcher, |
| boolean coerce)</code></th> |
| <td class="colLast"> |
| <div class="block">Looks up all subject routines matching the given name and argument types.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i21"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#matchRoutinesByParameterCount(org.apache.calcite.sql.SqlOperatorTable,org.apache.calcite.sql.SqlIdentifier,java.util.List,org.apache.calcite.sql.SqlFunctionCategory,org.apache.calcite.sql.validate.SqlNameMatcher)">matchRoutinesByParameterCount</a></span>​(<a href="SqlOperatorTable.html" title="interface in org.apache.calcite.sql">SqlOperatorTable</a> opTab, |
| <a href="SqlIdentifier.html" title="class in org.apache.calcite.sql">SqlIdentifier</a> funcName, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>> argTypes, |
| <a href="SqlFunctionCategory.html" title="enum in org.apache.calcite.sql">SqlFunctionCategory</a> category, |
| <a href="validate/SqlNameMatcher.html" title="interface in org.apache.calcite.sql.validate">SqlNameMatcher</a> nameMatcher)</code></th> |
| <td class="colLast"> |
| <div class="block">Determines whether there is a routine matching the given name and number |
| of arguments.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i22"> |
| <td class="colFirst"><code>static <a href="../runtime/CalciteContextException.html" title="class in org.apache.calcite.runtime">CalciteContextException</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#newContextException(int,int,int,int,org.apache.calcite.runtime.Resources.ExInst)">newContextException</a></span>​(int line, |
| int col, |
| int endLine, |
| int endCol, |
| org.apache.calcite.runtime.Resources.ExInst<?> e)</code></th> |
| <td class="colLast"> |
| <div class="block">Wraps an exception with context.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i23"> |
| <td class="colFirst"><code>static <a href="../runtime/CalciteContextException.html" title="class in org.apache.calcite.runtime">CalciteContextException</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#newContextException(org.apache.calcite.sql.parser.SqlParserPos,org.apache.calcite.runtime.Resources.ExInst)">newContextException</a></span>​(<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos, |
| org.apache.calcite.runtime.Resources.ExInst<?> e)</code></th> |
| <td class="colLast"> |
| <div class="block">Wraps an exception with context.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i24"> |
| <td class="colFirst"><code>static <a href="../runtime/CalciteException.html" title="class in org.apache.calcite.runtime">CalciteException</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#newContextException(org.apache.calcite.sql.parser.SqlParserPos,org.apache.calcite.runtime.Resources.ExInst,java.lang.String)">newContextException</a></span>​(<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos, |
| org.apache.calcite.runtime.Resources.ExInst<?> e, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> inputText)</code></th> |
| <td class="colLast"> |
| <div class="block">Wraps an exception with context.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i25"> |
| <td class="colFirst"><code>static @PolyNull <a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#stripAs(org.apache.calcite.sql.SqlNode)">stripAs</a></span>​(@PolyNull <a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node)</code></th> |
| <td class="colLast"> |
| <div class="block">If a node is "AS", returns the underlying expression; otherwise returns |
| the node.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i26"> |
| <td class="colFirst"><code>static <a href="SqlNodeList.html" title="class in org.apache.calcite.sql">SqlNodeList</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#stripListAs(org.apache.calcite.sql.SqlNodeList)">stripListAs</a></span>​(<a href="SqlNodeList.html" title="class in org.apache.calcite.sql">SqlNodeList</a> nodeList)</code></th> |
| <td class="colLast"> |
| <div class="block">Modifies a list of nodes, removing AS from each if present.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i27"> |
| <td class="colFirst"><code>static <a href="SqlNodeList.html" title="class in org.apache.calcite.sql">SqlNodeList</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toNodeList(org.apache.calcite.sql.SqlNode%5B%5D)">toNodeList</a></span>​(<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>[] operands)</code></th> |
| <td class="colLast"> |
| <div class="block">Converts a SqlNode array to a SqlNodeList.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i28"> |
| <td class="colFirst"><code>static @Nullable <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#translateCharacterSetName(java.lang.String)">translateCharacterSetName</a></span>​(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> name)</code></th> |
| <td class="colLast"> |
| <div class="block">Translates a character set name from a SQL-level name into a Java-level |
| name.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i29"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unparseBinarySyntax(org.apache.calcite.sql.SqlOperator,org.apache.calcite.sql.SqlCall,org.apache.calcite.sql.SqlWriter,int,int)">unparseBinarySyntax</a></span>​(<a href="SqlOperator.html" title="class in org.apache.calcite.sql">SqlOperator</a> operator, |
| <a href="SqlCall.html" title="class in org.apache.calcite.sql">SqlCall</a> call, |
| <a href="SqlWriter.html" title="interface in org.apache.calcite.sql">SqlWriter</a> writer, |
| int leftPrec, |
| int rightPrec)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor" id="i30"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unparseFunctionSyntax(org.apache.calcite.sql.SqlOperator,org.apache.calcite.sql.SqlWriter,org.apache.calcite.sql.SqlCall)">unparseFunctionSyntax</a></span>​(<a href="SqlOperator.html" title="class in org.apache.calcite.sql">SqlOperator</a> operator, |
| <a href="SqlWriter.html" title="interface in org.apache.calcite.sql">SqlWriter</a> writer, |
| <a href="SqlCall.html" title="class in org.apache.calcite.sql">SqlCall</a> call)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i31"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unparseFunctionSyntax(org.apache.calcite.sql.SqlOperator,org.apache.calcite.sql.SqlWriter,org.apache.calcite.sql.SqlCall,boolean)">unparseFunctionSyntax</a></span>​(<a href="SqlOperator.html" title="class in org.apache.calcite.sql">SqlOperator</a> operator, |
| <a href="SqlWriter.html" title="interface in org.apache.calcite.sql">SqlWriter</a> writer, |
| <a href="SqlCall.html" title="class in org.apache.calcite.sql">SqlCall</a> call, |
| boolean ordered)</code></th> |
| <td class="colLast"> |
| <div class="block">Unparses a call to an operator that has function syntax.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i32"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unparseSqlIdentifierSyntax(org.apache.calcite.sql.SqlWriter,org.apache.calcite.sql.SqlIdentifier,boolean)">unparseSqlIdentifierSyntax</a></span>​(<a href="SqlWriter.html" title="interface in org.apache.calcite.sql">SqlWriter</a> writer, |
| <a href="SqlIdentifier.html" title="class in org.apache.calcite.sql">SqlIdentifier</a> identifier, |
| boolean asFunctionID)</code></th> |
| <td class="colLast"> |
| <div class="block">Unparse a SqlIdentifier syntax.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i33"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#validateCharset(org.apache.calcite.avatica.util.ByteString,java.nio.charset.Charset)">validateCharset</a></span>​(org.apache.calcite.avatica.util.ByteString value, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset" class="externalLink">Charset</a> charset)</code></th> |
| <td class="colLast"> |
| <div class="block">Validate if value can be decoded by given charset.</div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| <div class="inheritedList"> |
| <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3> |
| <a id="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a><code><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <section class="details"> |
| <ul class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <li class="blockList"> |
| <section class="constructorDetails"><a id="constructor.detail"> |
| <!-- --> |
| </a> |
| <h2>Constructor Details</h2> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="<init>()">SqlUtil</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="memberName">SqlUtil</span>()</div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| <!-- ============ METHOD DETAIL ========== --> |
| <li class="blockList"> |
| <section class="methodDetails"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h2>Method Details</h2> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="andExpressions(org.apache.calcite.sql.SqlNode,org.apache.calcite.sql.SqlNode)">andExpressions</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType"><a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></span> <span class="memberName">andExpressions</span>​(<span class="arguments">@Nullable <a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node1, |
| <a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node2)</span></div> |
| <div class="block">Returns the AND of two expressions. |
| |
| <p>If <code>node1</code> is null, returns <code>node2</code>. |
| Flattens if either node is an AND.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="getFromNode(org.apache.calcite.sql.SqlSelect,int)">getFromNode</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType"><a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></span> <span class="memberName">getFromNode</span>​(<span class="arguments"><a href="SqlSelect.html" title="class in org.apache.calcite.sql">SqlSelect</a> query, |
| int ordinal)</span></div> |
| <div class="block">Returns the <code>n</code>th (0-based) input to a join expression.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toNodeList(org.apache.calcite.sql.SqlNode[])">toNodeList</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType"><a href="SqlNodeList.html" title="class in org.apache.calcite.sql">SqlNodeList</a></span> <span class="memberName">toNodeList</span>​(<span class="arguments"><a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>[] operands)</span></div> |
| <div class="block">Converts a SqlNode array to a SqlNodeList.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="isNullLiteral(org.apache.calcite.sql.SqlNode,boolean)">isNullLiteral</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType">boolean</span> <span class="memberName">isNullLiteral</span>​(<span class="arguments">@Nullable <a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node, |
| boolean allowCast)</span></div> |
| <div class="block">Returns whether a node represents the NULL value. |
| |
| <p>Examples: |
| |
| <ul> |
| <li>For <a href="SqlLiteral.html" title="class in org.apache.calcite.sql"><code>SqlLiteral</code></a> Unknown, returns false. |
| <li>For <code>CAST(NULL AS <i>type</i>)</code>, returns true if <code> |
| allowCast</code> is true, false otherwise. |
| <li>For <code>CAST(CAST(NULL AS <i>type</i>) AS <i>type</i>))</code>, |
| returns false. |
| </ul></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="isNull(org.apache.calcite.sql.SqlNode)">isNull</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType">boolean</span> <span class="memberName">isNull</span>​(<span class="arguments"><a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node)</span></div> |
| <div class="block">Returns whether a node represents the NULL value or a series of nested |
| <code>CAST(NULL AS type)</code> calls. For example: |
| <code>isNull(CAST(CAST(NULL as INTEGER) AS VARCHAR(1)))</code> |
| returns <code>true</code>.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="isLiteral(org.apache.calcite.sql.SqlNode,boolean)">isLiteral</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType">boolean</span> <span class="memberName">isLiteral</span>​(<span class="arguments"><a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node, |
| boolean allowCast)</span></div> |
| <div class="block">Returns whether a node is a literal. |
| |
| <p>Examples: |
| |
| <ul> |
| <li>For <code>CAST(literal AS <i>type</i>)</code>, returns true if <code> |
| allowCast</code> is true, false otherwise. |
| <li>For <code>CAST(CAST(literal AS <i>type</i>) AS <i>type</i>))</code>, |
| returns false. |
| </ul></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>node</code> - The node, never null.</dd> |
| <dd><code>allowCast</code> - whether to regard CAST(literal) as a literal</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Whether the node is a literal</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="isLiteral(org.apache.calcite.sql.SqlNode)">isLiteral</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType">boolean</span> <span class="memberName">isLiteral</span>​(<span class="arguments"><a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node)</span></div> |
| <div class="block">Returns whether a node is a literal. |
| |
| <p>Many constructs which require literals also accept <code>CAST(NULL AS |
| <i>type</i>)</code>. This method does not accept casts, so you should |
| call <a href="#isNullLiteral(org.apache.calcite.sql.SqlNode,boolean)"><code>isNullLiteral(org.apache.calcite.sql.SqlNode, boolean)</code></a> first.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>node</code> - The node, never null.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Whether the node is a literal</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="isLiteralChain(org.apache.calcite.sql.SqlNode)">isLiteralChain</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType">boolean</span> <span class="memberName">isLiteralChain</span>​(<span class="arguments"><a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node)</span></div> |
| <div class="block">Returns whether a node is a literal chain which is used to represent a |
| continued string literal.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>node</code> - The node, never null.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Whether the node is a literal chain</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="unparseFunctionSyntax(org.apache.calcite.sql.SqlOperator,org.apache.calcite.sql.SqlWriter,org.apache.calcite.sql.SqlCall)">unparseFunctionSyntax</a></h3> |
| <div class="memberSignature"><span class="annotations"><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang" class="externalLink">@Deprecated</a> |
| </span><span class="modifiers">public static</span> <span class="returnType">void</span> <span class="memberName">unparseFunctionSyntax</span>​(<span class="arguments"><a href="SqlOperator.html" title="class in org.apache.calcite.sql">SqlOperator</a> operator, |
| <a href="SqlWriter.html" title="interface in org.apache.calcite.sql">SqlWriter</a> writer, |
| <a href="SqlCall.html" title="class in org.apache.calcite.sql">SqlCall</a> call)</span></div> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="unparseFunctionSyntax(org.apache.calcite.sql.SqlOperator,org.apache.calcite.sql.SqlWriter,org.apache.calcite.sql.SqlCall,boolean)">unparseFunctionSyntax</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType">void</span> <span class="memberName">unparseFunctionSyntax</span>​(<span class="arguments"><a href="SqlOperator.html" title="class in org.apache.calcite.sql">SqlOperator</a> operator, |
| <a href="SqlWriter.html" title="interface in org.apache.calcite.sql">SqlWriter</a> writer, |
| <a href="SqlCall.html" title="class in org.apache.calcite.sql">SqlCall</a> call, |
| boolean ordered)</span></div> |
| <div class="block">Unparses a call to an operator that has function syntax.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>operator</code> - The operator</dd> |
| <dd><code>writer</code> - Writer</dd> |
| <dd><code>call</code> - List of 0 or more operands</dd> |
| <dd><code>ordered</code> - Whether argument list may end with ORDER BY</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="unparseSqlIdentifierSyntax(org.apache.calcite.sql.SqlWriter,org.apache.calcite.sql.SqlIdentifier,boolean)">unparseSqlIdentifierSyntax</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType">void</span> <span class="memberName">unparseSqlIdentifierSyntax</span>​(<span class="arguments"><a href="SqlWriter.html" title="interface in org.apache.calcite.sql">SqlWriter</a> writer, |
| <a href="SqlIdentifier.html" title="class in org.apache.calcite.sql">SqlIdentifier</a> identifier, |
| boolean asFunctionID)</span></div> |
| <div class="block">Unparse a SqlIdentifier syntax.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>writer</code> - Writer</dd> |
| <dd><code>identifier</code> - SqlIdentifier</dd> |
| <dd><code>asFunctionID</code> - Whether this identifier comes from a SqlFunction</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="unparseBinarySyntax(org.apache.calcite.sql.SqlOperator,org.apache.calcite.sql.SqlCall,org.apache.calcite.sql.SqlWriter,int,int)">unparseBinarySyntax</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType">void</span> <span class="memberName">unparseBinarySyntax</span>​(<span class="arguments"><a href="SqlOperator.html" title="class in org.apache.calcite.sql">SqlOperator</a> operator, |
| <a href="SqlCall.html" title="class in org.apache.calcite.sql">SqlCall</a> call, |
| <a href="SqlWriter.html" title="interface in org.apache.calcite.sql">SqlWriter</a> writer, |
| int leftPrec, |
| int rightPrec)</span></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="concatenateLiterals(java.util.List)">concatenateLiterals</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType"><a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></span> <span class="memberName">concatenateLiterals</span>​(<span class="arguments"><a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a>> lits)</span></div> |
| <div class="block">Concatenates string literals. |
| |
| <p>This method takes an array of arguments, since pairwise concatenation |
| means too much string copying.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>lits</code> - an array of <a href="SqlLiteral.html" title="class in org.apache.calcite.sql"><code>SqlLiteral</code></a>, not empty, all of the same |
| class</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new <a href="SqlLiteral.html" title="class in org.apache.calcite.sql"><code>SqlLiteral</code></a>, of that same class, whose value is the |
| string concatenation of the values of the literals</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang" class="externalLink">ClassCastException</a></code> - if the lits are not homogeneous.</dd> |
| <dd><code><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">ArrayIndexOutOfBoundsException</a></code> - if lits is an empty array.</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="lookupRoutine(org.apache.calcite.sql.SqlOperatorTable,org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.sql.SqlIdentifier,java.util.List,java.util.List,org.apache.calcite.sql.SqlFunctionCategory,org.apache.calcite.sql.SqlSyntax,org.apache.calcite.sql.SqlKind,org.apache.calcite.sql.validate.SqlNameMatcher,boolean)">lookupRoutine</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType">@Nullable <a href="SqlOperator.html" title="class in org.apache.calcite.sql">SqlOperator</a></span> <span class="memberName">lookupRoutine</span>​(<span class="arguments"><a href="SqlOperatorTable.html" title="interface in org.apache.calcite.sql">SqlOperatorTable</a> opTab, |
| <a href="../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a> typeFactory, |
| <a href="SqlIdentifier.html" title="class in org.apache.calcite.sql">SqlIdentifier</a> funcName, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>> argTypes, |
| @Nullable <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>> argNames, |
| @Nullable <a href="SqlFunctionCategory.html" title="enum in org.apache.calcite.sql">SqlFunctionCategory</a> category, |
| <a href="SqlSyntax.html" title="enum in org.apache.calcite.sql">SqlSyntax</a> syntax, |
| <a href="SqlKind.html" title="enum in org.apache.calcite.sql">SqlKind</a> sqlKind, |
| <a href="validate/SqlNameMatcher.html" title="interface in org.apache.calcite.sql.validate">SqlNameMatcher</a> nameMatcher, |
| boolean coerce)</span></div> |
| <div class="block">Looks up a (possibly overloaded) routine based on name and argument |
| types.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>opTab</code> - operator table to search</dd> |
| <dd><code>typeFactory</code> - Type factory</dd> |
| <dd><code>funcName</code> - name of function being invoked</dd> |
| <dd><code>argTypes</code> - argument types</dd> |
| <dd><code>argNames</code> - argument names, or null if call by position</dd> |
| <dd><code>category</code> - whether a function or a procedure. (If a procedure is |
| being invoked, the overload rules are simpler.)</dd> |
| <dd><code>nameMatcher</code> - Whether to look up the function case-sensitively</dd> |
| <dd><code>coerce</code> - Whether to allow type coercion when do filter routines |
| by parameter types</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>matching routine, or null if none found</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../util/Glossary.html#SQL99"><code>SQL:1999 Part 2 Section 10.4</code></a></dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="lookupSubjectRoutines(org.apache.calcite.sql.SqlOperatorTable,org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.sql.SqlIdentifier,java.util.List,java.util.List,org.apache.calcite.sql.SqlSyntax,org.apache.calcite.sql.SqlKind,org.apache.calcite.sql.SqlFunctionCategory,org.apache.calcite.sql.validate.SqlNameMatcher,boolean)">lookupSubjectRoutines</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType"><a href="https://docs.oracle.com/javase/9/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util" class="externalLink">Iterator</a><<a href="SqlOperator.html" title="class in org.apache.calcite.sql">SqlOperator</a>></span> <span class="memberName">lookupSubjectRoutines</span>​(<span class="arguments"><a href="SqlOperatorTable.html" title="interface in org.apache.calcite.sql">SqlOperatorTable</a> opTab, |
| <a href="../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a> typeFactory, |
| <a href="SqlIdentifier.html" title="class in org.apache.calcite.sql">SqlIdentifier</a> funcName, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>> argTypes, |
| @Nullable <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>> argNames, |
| <a href="SqlSyntax.html" title="enum in org.apache.calcite.sql">SqlSyntax</a> sqlSyntax, |
| <a href="SqlKind.html" title="enum in org.apache.calcite.sql">SqlKind</a> sqlKind, |
| @Nullable <a href="SqlFunctionCategory.html" title="enum in org.apache.calcite.sql">SqlFunctionCategory</a> category, |
| <a href="validate/SqlNameMatcher.html" title="interface in org.apache.calcite.sql.validate">SqlNameMatcher</a> nameMatcher, |
| boolean coerce)</span></div> |
| <div class="block">Looks up all subject routines matching the given name and argument types.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>opTab</code> - operator table to search</dd> |
| <dd><code>typeFactory</code> - Type factory</dd> |
| <dd><code>funcName</code> - name of function being invoked</dd> |
| <dd><code>argTypes</code> - argument types</dd> |
| <dd><code>argNames</code> - argument names, or null if call by position</dd> |
| <dd><code>sqlSyntax</code> - the SqlSyntax of the SqlOperator being looked up</dd> |
| <dd><code>sqlKind</code> - the SqlKind of the SqlOperator being looked up</dd> |
| <dd><code>category</code> - Category of routine to look up</dd> |
| <dd><code>nameMatcher</code> - Whether to look up the function case-sensitively</dd> |
| <dd><code>coerce</code> - Whether to allow type coercion when do filter routine |
| by parameter types</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>list of matching routines</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../util/Glossary.html#SQL99"><code>SQL:1999 Part 2 Section 10.4</code></a></dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="matchRoutinesByParameterCount(org.apache.calcite.sql.SqlOperatorTable,org.apache.calcite.sql.SqlIdentifier,java.util.List,org.apache.calcite.sql.SqlFunctionCategory,org.apache.calcite.sql.validate.SqlNameMatcher)">matchRoutinesByParameterCount</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType">boolean</span> <span class="memberName">matchRoutinesByParameterCount</span>​(<span class="arguments"><a href="SqlOperatorTable.html" title="interface in org.apache.calcite.sql">SqlOperatorTable</a> opTab, |
| <a href="SqlIdentifier.html" title="class in org.apache.calcite.sql">SqlIdentifier</a> funcName, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>> argTypes, |
| <a href="SqlFunctionCategory.html" title="enum in org.apache.calcite.sql">SqlFunctionCategory</a> category, |
| <a href="validate/SqlNameMatcher.html" title="interface in org.apache.calcite.sql.validate">SqlNameMatcher</a> nameMatcher)</span></div> |
| <div class="block">Determines whether there is a routine matching the given name and number |
| of arguments.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>opTab</code> - operator table to search</dd> |
| <dd><code>funcName</code> - name of function being invoked</dd> |
| <dd><code>argTypes</code> - argument types</dd> |
| <dd><code>category</code> - category of routine to look up</dd> |
| <dd><code>nameMatcher</code> - Whether to look up the function case-sensitively</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if match found</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="getSelectListItem(org.apache.calcite.sql.SqlNode,int)">getSelectListItem</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType"><a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></span> <span class="memberName">getSelectListItem</span>​(<span class="arguments"><a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> query, |
| int i)</span></div> |
| <div class="block">Returns the <code>i</code>th select-list item of a query.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="deriveAliasFromOrdinal(int)">deriveAliasFromOrdinal</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType"><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></span> <span class="memberName">deriveAliasFromOrdinal</span>​(<span class="arguments">int ordinal)</span></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="getOperatorSignature(org.apache.calcite.sql.SqlOperator,java.util.List)">getOperatorSignature</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType"><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></span> <span class="memberName">getOperatorSignature</span>​(<span class="arguments"><a href="SqlOperator.html" title="class in org.apache.calcite.sql">SqlOperator</a> op, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><?> typeList)</span></div> |
| <div class="block">Constructs an operator signature from a type list.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>op</code> - operator</dd> |
| <dd><code>typeList</code> - list of types to use for operands. Types may be |
| represented as <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>String</code></a>, <a href="type/SqlTypeFamily.html" title="enum in org.apache.calcite.sql.type"><code>SqlTypeFamily</code></a>, or |
| any object with a valid <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink"><code>Object.toString()</code></a> method.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>constructed signature</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="getAliasedSignature(org.apache.calcite.sql.SqlOperator,java.lang.String,java.util.List)">getAliasedSignature</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType"><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></span> <span class="memberName">getAliasedSignature</span>​(<span class="arguments"><a href="SqlOperator.html" title="class in org.apache.calcite.sql">SqlOperator</a> op, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> opName, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><?> typeList)</span></div> |
| <div class="block">Constructs an operator signature from a type list, substituting an alias |
| for the operator name.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>op</code> - operator</dd> |
| <dd><code>opName</code> - name to use for operator</dd> |
| <dd><code>typeList</code> - list of <a href="type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type"><code>SqlTypeName</code></a> or <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>String</code></a> to use for |
| operands</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>constructed signature</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="newContextException(org.apache.calcite.sql.parser.SqlParserPos,org.apache.calcite.runtime.Resources.ExInst,java.lang.String)">newContextException</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType"><a href="../runtime/CalciteException.html" title="class in org.apache.calcite.runtime">CalciteException</a></span> <span class="memberName">newContextException</span>​(<span class="arguments"><a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos, |
| org.apache.calcite.runtime.Resources.ExInst<?> e, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> inputText)</span></div> |
| <div class="block">Wraps an exception with context.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="newContextException(org.apache.calcite.sql.parser.SqlParserPos,org.apache.calcite.runtime.Resources.ExInst)">newContextException</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType"><a href="../runtime/CalciteContextException.html" title="class in org.apache.calcite.runtime">CalciteContextException</a></span> <span class="memberName">newContextException</span>​(<span class="arguments"><a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos, |
| org.apache.calcite.runtime.Resources.ExInst<?> e)</span></div> |
| <div class="block">Wraps an exception with context.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="newContextException(int,int,int,int,org.apache.calcite.runtime.Resources.ExInst)">newContextException</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType"><a href="../runtime/CalciteContextException.html" title="class in org.apache.calcite.runtime">CalciteContextException</a></span> <span class="memberName">newContextException</span>​(<span class="arguments">int line, |
| int col, |
| int endLine, |
| int endCol, |
| org.apache.calcite.runtime.Resources.ExInst<?> e)</span></div> |
| <div class="block">Wraps an exception with context.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="isCallTo(org.apache.calcite.sql.SqlNode,org.apache.calcite.sql.SqlOperator)">isCallTo</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType">boolean</span> <span class="memberName">isCallTo</span>​(<span class="arguments"><a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node, |
| <a href="SqlOperator.html" title="class in org.apache.calcite.sql">SqlOperator</a> operator)</span></div> |
| <div class="block">Returns whether a <a href="SqlNode.html" title="class in org.apache.calcite.sql"><code>node</code></a> is a <a href="SqlCall.html" title="class in org.apache.calcite.sql"><code>call</code></a> to a |
| given <a href="SqlOperator.html" title="class in org.apache.calcite.sql"><code>operator</code></a>.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="createNlsStringType(org.apache.calcite.rel.type.RelDataTypeFactory,org.apache.calcite.util.NlsString)">createNlsStringType</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType"><a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></span> <span class="memberName">createNlsStringType</span>​(<span class="arguments"><a href="../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a> typeFactory, |
| <a href="../util/NlsString.html" title="class in org.apache.calcite.util">NlsString</a> str)</span></div> |
| <div class="block">Creates the type of an <a href="../util/NlsString.html" title="class in org.apache.calcite.util"><code>NlsString</code></a>. |
| |
| <p>The type inherits the The NlsString's <a href="https://docs.oracle.com/javase/9/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset" class="externalLink"><code>Charset</code></a> and |
| <a href="SqlCollation.html" title="class in org.apache.calcite.sql"><code>SqlCollation</code></a>, if they are set, otherwise it gets the system |
| defaults.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>typeFactory</code> - Type factory</dd> |
| <dd><code>str</code> - String</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Type, including collation and charset</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="translateCharacterSetName(java.lang.String)">translateCharacterSetName</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType">@Nullable <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></span> <span class="memberName">translateCharacterSetName</span>​(<span class="arguments"><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> name)</span></div> |
| <div class="block">Translates a character set name from a SQL-level name into a Java-level |
| name.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - SQL-level name</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Java-level name, or null if SQL-level name is unknown</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="getCharset(java.lang.String)">getCharset</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType"><a href="https://docs.oracle.com/javase/9/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset" class="externalLink">Charset</a></span> <span class="memberName">getCharset</span>​(<span class="arguments"><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> charsetName)</span></div> |
| <div class="block">Returns the Java-level <a href="https://docs.oracle.com/javase/9/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset" class="externalLink"><code>Charset</code></a> based on given SQL-level name.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>charsetName</code> - Sql charset name, must not be null.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>charset, or default charset if charsetName is null.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/9/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset" class="externalLink">UnsupportedCharsetException</a></code> - If no support for the named charset |
| is available in this instance of the Java virtual machine</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="validateCharset(org.apache.calcite.avatica.util.ByteString,java.nio.charset.Charset)">validateCharset</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType">void</span> <span class="memberName">validateCharset</span>​(<span class="arguments">org.apache.calcite.avatica.util.ByteString value, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset" class="externalLink">Charset</a> charset)</span></div> |
| <div class="block">Validate if value can be decoded by given charset.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - nls string in byte array</dd> |
| <dd><code>charset</code> - charset</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/RuntimeException.html?is-external=true" title="class or interface in java.lang" class="externalLink">RuntimeException</a></code> - If the given value cannot be represented in the |
| given charset</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="stripAs(org.apache.calcite.sql.SqlNode)">stripAs</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType">@PolyNull <a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></span> <span class="memberName">stripAs</span>​(<span class="arguments">@PolyNull <a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node)</span></div> |
| <div class="block">If a node is "AS", returns the underlying expression; otherwise returns |
| the node. Returns null if and only if the node is null.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="stripListAs(org.apache.calcite.sql.SqlNodeList)">stripListAs</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType"><a href="SqlNodeList.html" title="class in org.apache.calcite.sql">SqlNodeList</a></span> <span class="memberName">stripListAs</span>​(<span class="arguments"><a href="SqlNodeList.html" title="class in org.apache.calcite.sql">SqlNodeList</a> nodeList)</span></div> |
| <div class="block">Modifies a list of nodes, removing AS from each if present.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#stripAs(org.apache.calcite.sql.SqlNode)"><code>stripAs(org.apache.calcite.sql.SqlNode)</code></a></dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="getAncestry(org.apache.calcite.sql.SqlNode,java.util.function.Predicate,java.util.function.Predicate)">getAncestry</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType">com.google.common.collect.ImmutableList<<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>></span> <span class="memberName">getAncestry</span>​(<span class="arguments"><a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> root, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/function/Predicate.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Predicate</a><<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>> predicate, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/function/Predicate.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Predicate</a><<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>> postPredicate)</span></div> |
| <div class="block">Returns a list of ancestors of <code>predicate</code> within a given |
| <code>SqlNode</code> tree. |
| |
| <p>The first element of the list is <code>root</code>, and the last is |
| the node that matched <code>predicate</code>. Throws if no node matches.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="getRelHint(org.apache.calcite.rel.hint.HintStrategyTable,org.apache.calcite.sql.SqlNodeList)">getRelHint</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType"><a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="../rel/hint/RelHint.html" title="class in org.apache.calcite.rel.hint">RelHint</a>></span> <span class="memberName">getRelHint</span>​(<span class="arguments"><a href="../rel/hint/HintStrategyTable.html" title="class in org.apache.calcite.rel.hint">HintStrategyTable</a> hintStrategies, |
| @Nullable <a href="SqlNodeList.html" title="class in org.apache.calcite.sql">SqlNodeList</a> sqlHints)</span></div> |
| <div class="block">Returns an immutable list of <a href="../rel/hint/RelHint.html" title="class in org.apache.calcite.rel.hint"><code>RelHint</code></a> from sql hints, with a given |
| inherit path from the root node. |
| |
| <p>The inherit path would be empty list.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>hintStrategies</code> - The hint strategies to validate the sql hints</dd> |
| <dd><code>sqlHints</code> - The sql hints nodes</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the <code>RelHint</code> list</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="attachRelHint(org.apache.calcite.rel.hint.HintStrategyTable,java.util.List,org.apache.calcite.rel.hint.Hintable)">attachRelHint</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType"><a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a></span> <span class="memberName">attachRelHint</span>​(<span class="arguments"><a href="../rel/hint/HintStrategyTable.html" title="class in org.apache.calcite.rel.hint">HintStrategyTable</a> hintStrategies, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="../rel/hint/RelHint.html" title="class in org.apache.calcite.rel.hint">RelHint</a>> hints, |
| <a href="../rel/hint/Hintable.html" title="interface in org.apache.calcite.rel.hint">Hintable</a> rel)</span></div> |
| <div class="block">Attach the <code>hints</code> to <code>rel</code> with specified hint strategies.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>hintStrategies</code> - The strategies to filter the hints</dd> |
| <dd><code>hints</code> - The original hints to be attached</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A copy of <code>rel</code> if there are any hints can be attached given |
| the hint strategies, or the original node if such hints don't exist</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="createCall(org.apache.calcite.sql.SqlOperator,org.apache.calcite.sql.parser.SqlParserPos,java.util.List)">createCall</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType"><a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></span> <span class="memberName">createCall</span>​(<span class="arguments"><a href="SqlOperator.html" title="class in org.apache.calcite.sql">SqlOperator</a> op, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>> operands)</span></div> |
| <div class="block">Creates a call to an operator. |
| |
| <p>Deals with the fact the AND and OR are binary.</div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| <footer role="contentinfo"> |
| <nav role="navigation"> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a id="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage"><b>Apache Calcite</b></div> |
| </div> |
| <div class="subNav"> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| </div> |
| <a id="skip.navbar.bottom"> |
| <!-- --> |
| </a> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </nav> |
| <p class="legalCopy"><small>Copyright © 2012-2021 Apache Software Foundation. All Rights Reserved.</small></p> |
| </footer> |
| </div> |
| </div> |
| </body> |
| </html> |