| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="zh"> |
| <head> |
| <!-- Generated by javadoc --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>InitializerContext (Apache Calcite calcite API)</title> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="InitializerContext (Apache Calcite calcite API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":6,"i1":6,"i2":18,"i3":6}; |
| var tabs = {65535:["t0","所有方法"],2:["t2","实例方法"],4:["t3","抽象方法"],16:["t5","默认方法"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>您的浏览器已禁用 JavaScript。</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="跳过导航链接">跳过导航链接</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="导航"> |
| <li><a href="../../../../overview-summary.html">概览</a></li> |
| <li><a href="package-summary.html">程序包</a></li> |
| <li class="navBarCell1Rev">类</li> |
| <li><a href="package-tree.html">树</a></li> |
| <li><a href="../../../../deprecated-list.html">已过时</a></li> |
| <li><a href="../../../../index-all.html">索引</a></li> |
| <li><a href="../../../../help-doc.html">帮助</a></li> |
| </ul> |
| <div class="aboutLanguage"><b>Apache Calcite</b></div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../org/apache/calcite/sql2rel/DeduplicateCorrelateVariables.html" title="org.apache.calcite.sql2rel中的类"><span class="typeNameLink">上一个类</span></a></li> |
| <li><a href="../../../../org/apache/calcite/sql2rel/InitializerExpressionFactory.html" title="org.apache.calcite.sql2rel中的接口"><span class="typeNameLink">下一个类</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/calcite/sql2rel/InitializerContext.html" target="_top">框架</a></li> |
| <li><a href="InitializerContext.html" target="_top">无框架</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses-noframe.html">所有类</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>概要: </li> |
| <li>嵌套 | </li> |
| <li>字段 | </li> |
| <li>构造器 | </li> |
| <li><a href="#method.summary">方法</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>详细资料: </li> |
| <li>字段 | </li> |
| <li>构造器 | </li> |
| <li><a href="#method.detail">方法</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.calcite.sql2rel</div> |
| <h2 title="接口 InitializerContext" class="title">接口 InitializerContext</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>所有已知实现类:</dt> |
| <dd><a href="../../../../org/apache/calcite/sql2rel/SqlToRelConverter.Blackboard.html" title="org.apache.calcite.sql2rel中的类">SqlToRelConverter.Blackboard</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public interface <span class="typeNameLabel">InitializerContext</span></pre> |
| <div class="block">Provides context for <a href="../../../../org/apache/calcite/sql2rel/InitializerExpressionFactory.html" title="org.apache.calcite.sql2rel中的接口"><code>InitializerExpressionFactory</code></a> methods.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>方法概要</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="方法概要表, 列表方法和解释"> |
| <caption><span id="t0" class="activeTableTab"><span>所有方法</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">实例方法</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">抽象方法</a></span><span class="tabEnd"> </span></span><span id="t5" class="tableTab"><span><a href="javascript:show(16);">默认方法</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">限定符和类型</th> |
| <th class="colLast" scope="col">方法和说明</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/sql2rel/InitializerContext.html#convertExpression-org.apache.calcite.sql.SqlNode-">convertExpression</a></span>(<a href="../../../../org/apache/calcite/sql/SqlNode.html" title="org.apache.calcite.sql中的类">SqlNode</a> expr)</code> |
| <div class="block">Converts a <code>SqlNode</code> to <code>RexNode</code>.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/calcite/rex/RexBuilder.html" title="org.apache.calcite.rex中的类">RexBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/sql2rel/InitializerContext.html#getRexBuilder--">getRexBuilder</a></span>()</code> </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>default <a href="../../../../org/apache/calcite/sql/SqlNode.html" title="org.apache.calcite.sql中的类">SqlNode</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/sql2rel/InitializerContext.html#parseExpression-org.apache.calcite.sql.parser.SqlParser.Config-java.lang.String-">parseExpression</a></span>(<a href="../../../../org/apache/calcite/sql/parser/SqlParser.Config.html" title="org.apache.calcite.sql.parser中的接口">SqlParser.Config</a> config, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="java.lang中的类或接口">String</a> expr)</code> |
| <div class="block">Parse a column computation expression for a table.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/calcite/sql/SqlNode.html" title="org.apache.calcite.sql中的类">SqlNode</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/sql2rel/InitializerContext.html#validateExpression-org.apache.calcite.rel.type.RelDataType-org.apache.calcite.sql.SqlNode-">validateExpression</a></span>(<a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="org.apache.calcite.rel.type中的接口">RelDataType</a> rowType, |
| <a href="../../../../org/apache/calcite/sql/SqlNode.html" title="org.apache.calcite.sql中的类">SqlNode</a> expr)</code> |
| <div class="block">Validate the expression with a base table row type.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>方法详细资料</h3> |
| <a name="getRexBuilder--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getRexBuilder</h4> |
| <pre><a href="../../../../org/apache/calcite/rex/RexBuilder.html" title="org.apache.calcite.rex中的类">RexBuilder</a> getRexBuilder()</pre> |
| </li> |
| </ul> |
| <a name="parseExpression-org.apache.calcite.sql.parser.SqlParser.Config-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>parseExpression</h4> |
| <pre>default <a href="../../../../org/apache/calcite/sql/SqlNode.html" title="org.apache.calcite.sql中的类">SqlNode</a> parseExpression(<a href="../../../../org/apache/calcite/sql/parser/SqlParser.Config.html" title="org.apache.calcite.sql.parser中的接口">SqlParser.Config</a> config, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="java.lang中的类或接口">String</a> expr)</pre> |
| <div class="block">Parse a column computation expression for a table. Usually this expression is declared |
| in the create table statement, i.e. |
| <pre> |
| create table t( |
| a int not null, |
| b varchar(5) as (my_udf(a)) virtual, |
| c int not null as (a + 1) |
| ); |
| </pre> |
| |
| <p>You can use the string format expression "my_udf(a)" and "a + 1" |
| as the initializer expression of column b and c. |
| |
| <p>Calcite doesn't really need this now because the DDL nodes |
| can be executed directly from <code>SqlNode</code>s, but we still provide the way |
| to initialize from a SQL-like string, because a string can be used to persist easily and |
| the column expressions are important part of the table metadata.</div> |
| <dl> |
| <dt><span class="paramLabel">参数:</span></dt> |
| <dd><code>config</code> - parse config</dd> |
| <dd><code>expr</code> - the SQL-style column expression</dd> |
| <dt><span class="returnLabel">返回:</span></dt> |
| <dd>a <code>SqlNode</code> instance</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="validateExpression-org.apache.calcite.rel.type.RelDataType-org.apache.calcite.sql.SqlNode-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>validateExpression</h4> |
| <pre><a href="../../../../org/apache/calcite/sql/SqlNode.html" title="org.apache.calcite.sql中的类">SqlNode</a> validateExpression(<a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="org.apache.calcite.rel.type中的接口">RelDataType</a> rowType, |
| <a href="../../../../org/apache/calcite/sql/SqlNode.html" title="org.apache.calcite.sql中的类">SqlNode</a> expr)</pre> |
| <div class="block">Validate the expression with a base table row type. The expression may reference the fields |
| of the row type defines.</div> |
| <dl> |
| <dt><span class="paramLabel">参数:</span></dt> |
| <dd><code>rowType</code> - the table row type</dd> |
| <dd><code>expr</code> - the expression</dd> |
| <dt><span class="returnLabel">返回:</span></dt> |
| <dd>a validated <code>SqlNode</code>, usually it transforms |
| from a <code>SqlUnresolvedFunction</code> to a resolved one</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="convertExpression-org.apache.calcite.sql.SqlNode-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>convertExpression</h4> |
| <pre><a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a> convertExpression(<a href="../../../../org/apache/calcite/sql/SqlNode.html" title="org.apache.calcite.sql中的类">SqlNode</a> expr)</pre> |
| <div class="block">Converts a <code>SqlNode</code> to <code>RexNode</code>. |
| |
| <p>Caution that the <code>SqlNode</code> must be validated, |
| you can use <a href="../../../../org/apache/calcite/sql2rel/InitializerContext.html#validateExpression-org.apache.calcite.rel.type.RelDataType-org.apache.calcite.sql.SqlNode-"><code>validateExpression(org.apache.calcite.rel.type.RelDataType, org.apache.calcite.sql.SqlNode)</code></a> to validate if the <code>SqlNode</code> |
| is un-validated.</div> |
| <dl> |
| <dt><span class="paramLabel">参数:</span></dt> |
| <dd><code>expr</code> - the expression of sql node to convert</dd> |
| <dt><span class="returnLabel">返回:</span></dt> |
| <dd>a converted <code>RexNode</code> instance</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="跳过导航链接">跳过导航链接</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="导航"> |
| <li><a href="../../../../overview-summary.html">概览</a></li> |
| <li><a href="package-summary.html">程序包</a></li> |
| <li class="navBarCell1Rev">类</li> |
| <li><a href="package-tree.html">树</a></li> |
| <li><a href="../../../../deprecated-list.html">已过时</a></li> |
| <li><a href="../../../../index-all.html">索引</a></li> |
| <li><a href="../../../../help-doc.html">帮助</a></li> |
| </ul> |
| <div class="aboutLanguage"><b>Apache Calcite</b></div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../org/apache/calcite/sql2rel/DeduplicateCorrelateVariables.html" title="org.apache.calcite.sql2rel中的类"><span class="typeNameLink">上一个类</span></a></li> |
| <li><a href="../../../../org/apache/calcite/sql2rel/InitializerExpressionFactory.html" title="org.apache.calcite.sql2rel中的接口"><span class="typeNameLink">下一个类</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/calcite/sql2rel/InitializerContext.html" target="_top">框架</a></li> |
| <li><a href="InitializerContext.html" target="_top">无框架</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses-noframe.html">所有类</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>概要: </li> |
| <li>嵌套 | </li> |
| <li>字段 | </li> |
| <li>构造器 | </li> |
| <li><a href="#method.summary">方法</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>详细资料: </li> |
| <li>字段 | </li> |
| <li>构造器 | </li> |
| <li><a href="#method.detail">方法</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2012-2020 Apache Software Foundation. All Rights Reserved.</small></p> |
| </body> |
| </html> |