blob: 07a81e7806348da87bf05cfa2898d63b18d4a1f7 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>Table (Apache Calcite API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="declaration: package: org.apache.calcite.schema, interface: Table">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var evenRowColor = "even-row-color";
var oddRowColor = "odd-row-color";
var tableTab = "table-tab";
var activeTableTab = "active-table-tab";
var pathtoroot = "../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<div class="about-language"><b>Apache Calcite</b></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html#class">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.calcite.schema</a></div>
<h1 title="Interface Table" class="title">Interface Table</h1>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Known Subinterfaces:</dt>
<dd><code><a href="CustomColumnResolvingTable.html" title="interface in org.apache.calcite.schema">CustomColumnResolvingTable</a></code>, <code><a href="ExtensibleTable.html" title="interface in org.apache.calcite.schema">ExtensibleTable</a></code>, <code><a href="FilterableTable.html" title="interface in org.apache.calcite.schema">FilterableTable</a></code>, <code><a href="ModifiableTable.html" title="interface in org.apache.calcite.schema">ModifiableTable</a></code>, <code><a href="ModifiableView.html" title="interface in org.apache.calcite.schema">ModifiableView</a></code>, <code><a href="ProjectableFilterableTable.html" title="interface in org.apache.calcite.schema">ProjectableFilterableTable</a></code>, <code><a href="QueryableTable.html" title="interface in org.apache.calcite.schema">QueryableTable</a></code>, <code><a href="ScannableTable.html" title="interface in org.apache.calcite.schema">ScannableTable</a></code>, <code><a href="StreamableTable.html" title="interface in org.apache.calcite.schema">StreamableTable</a></code>, <code><a href="TemporalTable.html" title="interface in org.apache.calcite.schema">TemporalTable</a></code>, <code><a href="TransientTable.html" title="interface in org.apache.calcite.schema">TransientTable</a></code>, <code><a href="TranslatableTable.html" title="interface in org.apache.calcite.schema">TranslatableTable</a></code></dd>
</dl>
<dl class="notes">
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="../test/AbstractModifiableTable.html" title="class in org.apache.calcite.test">AbstractModifiableTable</a></code>, <code><a href="../test/AbstractModifiableView.html" title="class in org.apache.calcite.test">AbstractModifiableView</a></code>, <code><a href="../adapter/java/AbstractQueryableTable.html" title="class in org.apache.calcite.adapter.java">AbstractQueryableTable</a></code>, <code><a href="impl/AbstractTable.html" title="class in org.apache.calcite.schema.impl">AbstractTable</a></code>, <code><a href="../test/schemata/orderstream/BaseOrderStreamTable.html" title="class in org.apache.calcite.test.schemata.orderstream">BaseOrderStreamTable</a></code>, <code><a href="../adapter/cassandra/CassandraTable.html" title="class in org.apache.calcite.adapter.cassandra">CassandraTable</a></code>, <code><a href="../adapter/csv/CsvFilterableTable.html" title="class in org.apache.calcite.adapter.csv">CsvFilterableTable</a></code>, <code><a href="../adapter/csv/CsvScannableTable.html" title="class in org.apache.calcite.adapter.csv">CsvScannableTable</a></code>, <code><a href="../adapter/csv/CsvStreamScannableTable.html" title="class in org.apache.calcite.adapter.csv">CsvStreamScannableTable</a></code>, <code><a href="../adapter/csv/CsvTable.html" title="class in org.apache.calcite.adapter.csv">CsvTable</a></code>, <code><a href="../adapter/file/CsvTable.html" title="class in org.apache.calcite.adapter.file">CsvTable</a></code>, <code><a href="../adapter/csv/CsvTranslatableTable.html" title="class in org.apache.calcite.adapter.csv">CsvTranslatableTable</a></code>, <code><a href="../adapter/file/CsvTranslatableTable.html" title="class in org.apache.calcite.adapter.file">CsvTranslatableTable</a></code>, <code><a href="../adapter/druid/DruidTable.html" title="class in org.apache.calcite.adapter.druid">DruidTable</a></code>, <code><a href="../adapter/elasticsearch/ElasticsearchTable.html" title="class in org.apache.calcite.adapter.elasticsearch">ElasticsearchTable</a></code>, <code><a href="../adapter/geode/simple/GeodeSimpleScannableTable.html" title="class in org.apache.calcite.adapter.geode.simple">GeodeSimpleScannableTable</a></code>, <code><a href="../adapter/geode/rel/GeodeTable.html" title="class in org.apache.calcite.adapter.geode.rel">GeodeTable</a></code>, <code><a href="../test/schemata/orderstream/InfiniteOrdersTable.html" title="class in org.apache.calcite.test.schemata.orderstream">InfiniteOrdersTable</a></code>, <code><a href="../adapter/innodb/InnodbTable.html" title="class in org.apache.calcite.adapter.innodb">InnodbTable</a></code>, <code><a href="../adapter/jdbc/JdbcTable.html" title="class in org.apache.calcite.adapter.jdbc">JdbcTable</a></code>, <code><a href="../adapter/file/JsonScannableTable.html" title="class in org.apache.calcite.adapter.file">JsonScannableTable</a></code>, <code><a href="../adapter/file/JsonTable.html" title="class in org.apache.calcite.adapter.file">JsonTable</a></code>, <code><a href="../adapter/kafka/KafkaStreamTable.html" title="class in org.apache.calcite.adapter.kafka">KafkaStreamTable</a></code>, <code><a href="impl/ListTransientTable.html" title="class in org.apache.calcite.schema.impl">ListTransientTable</a></code>, <code><a href="impl/MaterializedViewTable.html" title="class in org.apache.calcite.schema.impl">MaterializedViewTable</a></code>, <code><a href="../example/maze/MazeTable.html" title="class in org.apache.calcite.example.maze">MazeTable</a></code>, <code><a href="../test/catalog/MockCatalogReader.MockDynamicTable.html" title="class in org.apache.calcite.test.catalog">MockCatalogReader.MockDynamicTable</a></code>, <code><a href="../test/catalog/MockCatalogReader.MockModifiableViewRelOptTable.MockModifiableViewTable.html" title="class in org.apache.calcite.test.catalog">MockCatalogReader.MockModifiableViewRelOptTable.MockModifiableViewTable</a></code>, <code><a href="impl/ModifiableViewTable.html" title="class in org.apache.calcite.schema.impl">ModifiableViewTable</a></code>, <code><a href="../adapter/mongodb/MongoTable.html" title="class in org.apache.calcite.adapter.mongodb">MongoTable</a></code>, <code><a href="../test/schemata/orderstream/OrdersHistoryTable.html" title="class in org.apache.calcite.test.schemata.orderstream">OrdersHistoryTable</a></code>, <code><a href="../test/schemata/orderstream/OrdersTable.html" title="class in org.apache.calcite.test.schemata.orderstream">OrdersTable</a></code>, <code><a href="../adapter/pig/PigTable.html" title="class in org.apache.calcite.adapter.pig">PigTable</a></code>, <code><a href="../piglet/PigTable.html" title="class in org.apache.calcite.piglet">PigTable</a></code>, <code><a href="../test/schemata/orderstream/ProductsTable.html" title="class in org.apache.calcite.test.schemata.orderstream">ProductsTable</a></code>, <code><a href="../test/schemata/orderstream/ProductsTemporalTable.html" title="class in org.apache.calcite.test.schemata.orderstream">ProductsTemporalTable</a></code>, <code><a href="../adapter/redis/RedisTable.html" title="class in org.apache.calcite.adapter.redis">RedisTable</a></code>, <code><a href="../util/Smalls.MazeTable.html" title="class in org.apache.calcite.util">Smalls.MazeTable</a></code>, <code><a href="../util/Smalls.SimpleTable.html" title="class in org.apache.calcite.util">Smalls.SimpleTable</a></code>, <code><a href="../sql/fun/SqlSpatialTypeFunctions.ExplodeTable.html" title="class in org.apache.calcite.sql.fun">SqlSpatialTypeFunctions.ExplodeTable</a></code>, <code><a href="../sql/fun/SqlSpatialTypeFunctions.GridTable.html" title="class in org.apache.calcite.sql.fun">SqlSpatialTypeFunctions.GridTable</a></code>, <code><a href="impl/StarTable.html" title="class in org.apache.calcite.schema.impl">StarTable</a></code>, <code><a href="impl/ViewTable.html" title="class in org.apache.calcite.schema.impl">ViewTable</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public interface </span><span class="element-name type-name-label">Table</span></div>
<div class="block">Table.
<p>The typical way for a table to be created is when Calcite interrogates a
user-defined schema in order to validate names appearing in a SQL query.
Calcite finds the schema by calling <a href="Schema.html#getSubSchema(java.lang.String)"><code>Schema.getSubSchema(String)</code></a> on
the connection's root schema, then gets a table by calling
<a href="Schema.html#getTable(java.lang.String)"><code>Schema.getTable(String)</code></a>.</p>
<p>Note that a table does not know its name. It is in fact possible for
a table to be used more than once, perhaps under multiple names or under
multiple schemas. (Compare with the
<a href="http://en.wikipedia.org/wiki/Inode">i-node</a> concept in the UNIX
filesystem.)</p>
<p>A particular table instance may also implement <a href="Wrapper.html" title="interface in org.apache.calcite.schema"><code>Wrapper</code></a>,
to give access to sub-objects.</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="TableMacro.html" title="interface in org.apache.calcite.schema"><code>TableMacro</code></a></li>
</ul>
</dd>
</dl>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="Schema.TableType.html" title="enum in org.apache.calcite.schema">Schema.TableType</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getJdbcTableType()" class="member-name-link">getJdbcTableType</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Type of table.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getRowType(org.apache.calcite.rel.type.RelDataTypeFactory)" class="member-name-link">getRowType</a><wbr>(<a href="../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns this table's row type.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="Statistic.html" title="interface in org.apache.calcite.schema">Statistic</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getStatistic()" class="member-name-link">getStatistic</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns a provider of statistics about this table.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#isRolledUp(java.lang.String)" class="member-name-link">isRolledUp</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;column)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Determines whether the given <code>column</code> has been rolled up.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#rolledUpColumnValidInsideAgg(java.lang.String,org.apache.calcite.sql.SqlCall,org.apache.calcite.sql.SqlNode,org.apache.calcite.config.CalciteConnectionConfig)" class="member-name-link">rolledUpColumnValidInsideAgg</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;column,
<a href="../sql/SqlCall.html" title="class in org.apache.calcite.sql">SqlCall</a>&nbsp;call,
@Nullable <a href="../sql/SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&nbsp;parent,
@Nullable <a href="../config/CalciteConnectionConfig.html" title="interface in org.apache.calcite.config">CalciteConnectionConfig</a>&nbsp;config)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Determines whether the given rolled up column can be used inside the given aggregate function.</div>
</div>
</div>
</div>
</div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="getRowType(org.apache.calcite.rel.type.RelDataTypeFactory)">
<h3>getRowType</h3>
<div class="member-signature"><span class="return-type"><a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></span>&nbsp;<span class="element-name">getRowType</span><wbr><span class="parameters">(<a href="../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a>&nbsp;typeFactory)</span></div>
<div class="block">Returns this table's row type.
<p>This is a struct type whose
fields describe the names and types of the columns in this table.</p>
<p>The implementer must use the type factory provided. This ensures that
the type is converted into a canonical form; other equal types in the same
query will use the same object.</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>typeFactory</code> - Type factory with which to create the type</dd>
<dt>Returns:</dt>
<dd>Row type</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getStatistic()">
<h3>getStatistic</h3>
<div class="member-signature"><span class="return-type"><a href="Statistic.html" title="interface in org.apache.calcite.schema">Statistic</a></span>&nbsp;<span class="element-name">getStatistic</span>()</div>
<div class="block">Returns a provider of statistics about this table.</div>
</section>
</li>
<li>
<section class="detail" id="getJdbcTableType()">
<h3>getJdbcTableType</h3>
<div class="member-signature"><span class="return-type"><a href="Schema.TableType.html" title="enum in org.apache.calcite.schema">Schema.TableType</a></span>&nbsp;<span class="element-name">getJdbcTableType</span>()</div>
<div class="block">Type of table.</div>
</section>
</li>
<li>
<section class="detail" id="isRolledUp(java.lang.String)">
<h3>isRolledUp</h3>
<div class="member-signature"><span class="return-type">boolean</span>&nbsp;<span class="element-name">isRolledUp</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;column)</span></div>
<div class="block">Determines whether the given <code>column</code> has been rolled up.</div>
</section>
</li>
<li>
<section class="detail" id="rolledUpColumnValidInsideAgg(java.lang.String,org.apache.calcite.sql.SqlCall,org.apache.calcite.sql.SqlNode,org.apache.calcite.config.CalciteConnectionConfig)">
<h3>rolledUpColumnValidInsideAgg</h3>
<div class="member-signature"><span class="return-type">boolean</span>&nbsp;<span class="element-name">rolledUpColumnValidInsideAgg</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;column,
<a href="../sql/SqlCall.html" title="class in org.apache.calcite.sql">SqlCall</a>&nbsp;call,
@Nullable <a href="../sql/SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&nbsp;parent,
@Nullable <a href="../config/CalciteConnectionConfig.html" title="interface in org.apache.calcite.config">CalciteConnectionConfig</a>&nbsp;config)</span></div>
<div class="block">Determines whether the given rolled up column can be used inside the given aggregate function.
You can assume that <code>isRolledUp(column)</code> is <code>true</code>.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>column</code> - The column name for which <code>isRolledUp</code> is true</dd>
<dd><code>call</code> - The aggregate call</dd>
<dd><code>parent</code> - Parent node of <code>call</code> in the <a href="../sql/SqlNode.html" title="class in org.apache.calcite.sql"><code>SqlNode</code></a> tree</dd>
<dd><code>config</code> - Config settings. May be null</dd>
<dt>Returns:</dt>
<dd>true iff the given aggregate call is valid</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &copy; 2012-2023 Apache Software Foundation. All Rights Reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>