| <!DOCTYPE HTML> |
| <html lang> |
| <head> |
| <!-- Generated by javadoc (17) on Sat Jun 13 20:43:56 UTC 2026 --> |
| <title>SessionContext (Apache DataFusion Java 0.2.0-SNAPSHOT)</title> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="dc.created" content="2026-06-13"> |
| <meta name="description" content="declaration: package: org.apache.datafusion, class: SessionContext"> |
| <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.7.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> |
| <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="class-use/SessionContext.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</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: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor-summary">Constr</a> | </li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| <ul class="sub-nav-list"> |
| <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="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> <a href="package-summary.html">org.apache.datafusion</a></div> |
| <h1 title="Class SessionContext" class="title">Class SessionContext</h1> |
| </div> |
| <div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a> |
| <div class="inheritance">org.apache.datafusion.SessionContext</div> |
| </div> |
| <section class="class-description" id="class-description"> |
| <dl class="notes"> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/AutoCloseable.html" title="class or interface in java.lang" class="external-link">AutoCloseable</a></code></dd> |
| </dl> |
| <hr> |
| <div class="type-signature"><span class="modifiers">public final class </span><span class="element-name type-name-label">SessionContext</span> |
| <span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> |
| implements <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/AutoCloseable.html" title="class or interface in java.lang" class="external-link">AutoCloseable</a></span></div> |
| <div class="block">A DataFusion session context. |
| |
| <p>Instances are <strong>not thread-safe</strong>. Concurrent calls to any of <a href="#sql(java.lang.String)"><code>sql(java.lang.String)</code></a>, |
| <a href="#registerParquet(java.lang.String,java.lang.String)"><code>registerParquet(java.lang.String, java.lang.String)</code></a>, or <a href="#close()"><code>close()</code></a> from different threads can produce a use-after-free |
| on the native side. Callers must externally synchronize, or confine each context to a single |
| thread.</div> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <li> |
| <section class="constructor-summary" id="constructor-summary"> |
| <h2>Constructor Summary</h2> |
| <div class="caption"><span>Constructors</span></div> |
| <div class="summary-table two-column-summary"> |
| <div class="table-header col-first">Constructor</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">SessionContext</a>()</code></div> |
| <div class="col-last even-row-color"> </div> |
| </div> |
| </section> |
| </li> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <li> |
| <section class="method-summary" id="method-summary"> |
| <h2>Method Summary</h2> |
| <div id="method-summary-table"> |
| <div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div> |
| <div id="method-summary-table.tabpanel" role="tabpanel" aria-labelledby="method-summary-table-tab0"> |
| <div class="summary-table three-column-summary"> |
| <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-tab1 method-summary-table-tab4"><code>static <a href="SessionContextBuilder.html" title="class in org.apache.datafusion">SessionContextBuilder</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#builder()" class="member-name-link">builder</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Start configuring a <a href="SessionContext.html" title="class in org.apache.datafusion"><code>SessionContext</code></a>.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#close()" class="member-name-link">close</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#deregisterTable(java.lang.String)" class="member-name-link">deregisterTable</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> name)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Removes the table with the given name from this session.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="DataFrame.html" title="class in org.apache.datafusion">DataFrame</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#fromProto(byte%5B%5D)" class="member-name-link">fromProto</a><wbr>(byte[] planBytes)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Decode a DataFusion-Proto <code>LogicalPlanNode</code> and return a lazy <a href="DataFrame.html" title="class in org.apache.datafusion"><code>DataFrame</code></a>.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="DataFrame.html" title="class in org.apache.datafusion">DataFrame</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#fromSubstrait(byte%5B%5D)" class="member-name-link">fromSubstrait</a><wbr>(byte[] planBytes)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Decode a <a href="https://substrait.io/">Substrait</a> <code>Plan</code> message and return a lazy |
| <a href="DataFrame.html" title="class in org.apache.datafusion"><code>DataFrame</code></a>.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getOption(java.lang.String)" class="member-name-link">getOption</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> key)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Read the current value of a <code>datafusion.*</code> config key.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="MemoryUsage.html" title="class in org.apache.datafusion">MemoryUsage</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#memoryUsage()" class="member-name-link">memoryUsage</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Snapshot the session's memory pool: bytes currently held and the peak observed since this |
| session was created.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="DataFrame.html" title="class in org.apache.datafusion">DataFrame</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#readArrow(java.lang.String)" class="member-name-link">readArrow</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> path)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Read an Arrow IPC file as a <a href="DataFrame.html" title="class in org.apache.datafusion"><code>DataFrame</code></a> without registering it.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="DataFrame.html" title="class in org.apache.datafusion">DataFrame</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#readArrow(java.lang.String,org.apache.datafusion.ArrowReadOptions)" class="member-name-link">readArrow</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> path, |
| <a href="ArrowReadOptions.html" title="class in org.apache.datafusion">ArrowReadOptions</a> options)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Read an Arrow IPC file as a <a href="DataFrame.html" title="class in org.apache.datafusion"><code>DataFrame</code></a> with the supplied <a href="ArrowReadOptions.html" title="class in org.apache.datafusion"><code>ArrowReadOptions</code></a>.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="DataFrame.html" title="class in org.apache.datafusion">DataFrame</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#readAvro(java.lang.String)" class="member-name-link">readAvro</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> path)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Read an Avro file as a <a href="DataFrame.html" title="class in org.apache.datafusion"><code>DataFrame</code></a> without registering it.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="DataFrame.html" title="class in org.apache.datafusion">DataFrame</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#readAvro(java.lang.String,org.apache.datafusion.AvroReadOptions)" class="member-name-link">readAvro</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> path, |
| <a href="AvroReadOptions.html" title="class in org.apache.datafusion">AvroReadOptions</a> options)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Read an Avro file as a <a href="DataFrame.html" title="class in org.apache.datafusion"><code>DataFrame</code></a> with the supplied <a href="AvroReadOptions.html" title="class in org.apache.datafusion"><code>AvroReadOptions</code></a>.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="DataFrame.html" title="class in org.apache.datafusion">DataFrame</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#readCsv(java.lang.String)" class="member-name-link">readCsv</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> path)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Read a CSV file as a <a href="DataFrame.html" title="class in org.apache.datafusion"><code>DataFrame</code></a> without registering it.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="DataFrame.html" title="class in org.apache.datafusion">DataFrame</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#readCsv(java.lang.String,org.apache.datafusion.CsvReadOptions)" class="member-name-link">readCsv</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> path, |
| <a href="CsvReadOptions.html" title="class in org.apache.datafusion">CsvReadOptions</a> options)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Read a CSV file as a <a href="DataFrame.html" title="class in org.apache.datafusion"><code>DataFrame</code></a> with the supplied <a href="CsvReadOptions.html" title="class in org.apache.datafusion"><code>CsvReadOptions</code></a>.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="DataFrame.html" title="class in org.apache.datafusion">DataFrame</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#readJson(java.lang.String)" class="member-name-link">readJson</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> path)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Read a newline-delimited JSON file as a <a href="DataFrame.html" title="class in org.apache.datafusion"><code>DataFrame</code></a> without registering it.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="DataFrame.html" title="class in org.apache.datafusion">DataFrame</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#readJson(java.lang.String,org.apache.datafusion.NdJsonReadOptions)" class="member-name-link">readJson</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> path, |
| <a href="NdJsonReadOptions.html" title="class in org.apache.datafusion">NdJsonReadOptions</a> options)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Read a newline-delimited JSON file as a <a href="DataFrame.html" title="class in org.apache.datafusion"><code>DataFrame</code></a> with the supplied <a href="NdJsonReadOptions.html" title="class in org.apache.datafusion"><code>NdJsonReadOptions</code></a>.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="DataFrame.html" title="class in org.apache.datafusion">DataFrame</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#readParquet(java.lang.String)" class="member-name-link">readParquet</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> path)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Read a parquet file as a <a href="DataFrame.html" title="class in org.apache.datafusion"><code>DataFrame</code></a> without registering it.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="DataFrame.html" title="class in org.apache.datafusion">DataFrame</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#readParquet(java.lang.String,org.apache.datafusion.ParquetReadOptions)" class="member-name-link">readParquet</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> path, |
| <a href="ParquetReadOptions.html" title="class in org.apache.datafusion">ParquetReadOptions</a> options)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Read a parquet file as a <a href="DataFrame.html" title="class in org.apache.datafusion"><code>DataFrame</code></a> with the supplied <a href="ParquetReadOptions.html" title="class in org.apache.datafusion"><code>ParquetReadOptions</code></a>.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#registerArrow(java.lang.String,java.lang.String)" class="member-name-link">registerArrow</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> name, |
| <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> path)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Register an Arrow IPC file (or directory of Arrow IPC files) as a table.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#registerArrow(java.lang.String,java.lang.String,org.apache.datafusion.ArrowReadOptions)" class="member-name-link">registerArrow</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> name, |
| <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> path, |
| <a href="ArrowReadOptions.html" title="class in org.apache.datafusion">ArrowReadOptions</a> options)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Register an Arrow IPC file (or directory of Arrow IPC files) as a table with the supplied |
| <a href="ArrowReadOptions.html" title="class in org.apache.datafusion"><code>ArrowReadOptions</code></a>.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#registerAvro(java.lang.String,java.lang.String)" class="member-name-link">registerAvro</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> name, |
| <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> path)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Register an Avro file (or directory of Avro files) as a table.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#registerAvro(java.lang.String,java.lang.String,org.apache.datafusion.AvroReadOptions)" class="member-name-link">registerAvro</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> name, |
| <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> path, |
| <a href="AvroReadOptions.html" title="class in org.apache.datafusion">AvroReadOptions</a> options)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Register an Avro file (or directory of Avro files) as a table with the supplied <a href="AvroReadOptions.html" title="class in org.apache.datafusion"><code>AvroReadOptions</code></a>.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#registerCsv(java.lang.String,java.lang.String)" class="member-name-link">registerCsv</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> name, |
| <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> path)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#registerCsv(java.lang.String,java.lang.String,org.apache.datafusion.CsvReadOptions)" class="member-name-link">registerCsv</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> name, |
| <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> path, |
| <a href="CsvReadOptions.html" title="class in org.apache.datafusion">CsvReadOptions</a> options)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Register a CSV file (or directory of CSV files) as a table with the supplied <a href="CsvReadOptions.html" title="class in org.apache.datafusion"><code>CsvReadOptions</code></a>.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#registerJson(java.lang.String,java.lang.String)" class="member-name-link">registerJson</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> name, |
| <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> path)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#registerJson(java.lang.String,java.lang.String,org.apache.datafusion.NdJsonReadOptions)" class="member-name-link">registerJson</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> name, |
| <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> path, |
| <a href="NdJsonReadOptions.html" title="class in org.apache.datafusion">NdJsonReadOptions</a> options)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Register a newline-delimited JSON file (or directory of NDJSON files) as a table with the |
| supplied <a href="NdJsonReadOptions.html" title="class in org.apache.datafusion"><code>NdJsonReadOptions</code></a>.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#registerParquet(java.lang.String,java.lang.String)" class="member-name-link">registerParquet</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> name, |
| <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> path)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#registerParquet(java.lang.String,java.lang.String,org.apache.datafusion.ParquetReadOptions)" class="member-name-link">registerParquet</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> name, |
| <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> path, |
| <a href="ParquetReadOptions.html" title="class in org.apache.datafusion">ParquetReadOptions</a> options)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Register a parquet file as a table with the supplied <a href="ParquetReadOptions.html" title="class in org.apache.datafusion"><code>ParquetReadOptions</code></a>.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#registerTable(java.lang.String,org.apache.datafusion.TableProvider)" class="member-name-link">registerTable</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> name, |
| <a href="TableProvider.html" title="interface in org.apache.datafusion">TableProvider</a> provider)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Register a Java-implemented <a href="TableProvider.html" title="interface in org.apache.datafusion"><code>TableProvider</code></a> under <code>name</code>.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#registerUdf(org.apache.datafusion.ScalarUdf)" class="member-name-link">registerUdf</a><wbr>(<a href="ScalarUdf.html" title="class in org.apache.datafusion">ScalarUdf</a> udf)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Register a Java-implemented scalar UDF.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="RuntimeStats.html" title="class in org.apache.datafusion">RuntimeStats</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#runtimeStats()" class="member-name-link">runtimeStats</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Snapshot operational counters from the underlying Tokio runtime: worker count, busy time, queue |
| depth, etc.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="DataFrame.html" title="class in org.apache.datafusion">DataFrame</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#sql(java.lang.String)" class="member-name-link">sql</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> query)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Parse and plan <code>query</code>, returning a lazy <a href="DataFrame.html" title="class in org.apache.datafusion"><code>DataFrame</code></a>.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#tableExists(java.lang.String)" class="member-name-link">tableExists</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> name)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns <code>true</code> if a table with the given name is registered in this session.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>org.apache.arrow.vector.types.pojo.Schema</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#tableSchema(java.lang.String)" class="member-name-link">tableSchema</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> tableName)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Return the Arrow <code>Schema</code> of a registered table.</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class java.lang.<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3> |
| <code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <section class="details"> |
| <ul class="details-list"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <li> |
| <section class="constructor-details" id="constructor-detail"> |
| <h2>Constructor Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="<init>()"> |
| <h3>SessionContext</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">SessionContext</span>()</div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| <!-- ============ METHOD DETAIL ========== --> |
| <li> |
| <section class="method-details" id="method-detail"> |
| <h2>Method Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="builder()"> |
| <h3>builder</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="SessionContextBuilder.html" title="class in org.apache.datafusion">SessionContextBuilder</a></span> <span class="element-name">builder</span>()</div> |
| <div class="block">Start configuring a <a href="SessionContext.html" title="class in org.apache.datafusion"><code>SessionContext</code></a>.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="sql(java.lang.String)"> |
| <h3>sql</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="DataFrame.html" title="class in org.apache.datafusion">DataFrame</a></span> <span class="element-name">sql</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> query)</span></div> |
| <div class="block">Parse and plan <code>query</code>, returning a lazy <a href="DataFrame.html" title="class in org.apache.datafusion"><code>DataFrame</code></a>. The query is not executed |
| until <a href="DataFrame.html#collect(org.apache.arrow.memory.BufferAllocator)"><code>DataFrame.collect(org.apache.arrow.memory.BufferAllocator)</code></a> is called.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="fromProto(byte[])"> |
| <h3>fromProto</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="DataFrame.html" title="class in org.apache.datafusion">DataFrame</a></span> <span class="element-name">fromProto</span><wbr><span class="parameters">(byte[] planBytes)</span></div> |
| <div class="block">Decode a DataFusion-Proto <code>LogicalPlanNode</code> and return a lazy <a href="DataFrame.html" title="class in org.apache.datafusion"><code>DataFrame</code></a>. The plan |
| is not executed until <a href="DataFrame.html#collect(org.apache.arrow.memory.BufferAllocator)"><code>DataFrame.collect(org.apache.arrow.memory.BufferAllocator)</code></a> is called. |
| |
| <p>The bytes must be a serialized <code>datafusion.LogicalPlanNode</code> (see <code> |
| org.apache.datafusion.protobuf.LogicalPlanNode</code>).</div> |
| <dl class="notes"> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/RuntimeException.html" title="class or interface in java.lang" class="external-link">RuntimeException</a></code> - if the bytes are not a valid <code>LogicalPlanNode</code> or if logical |
| planning fails.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="fromSubstrait(byte[])"> |
| <h3>fromSubstrait</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="DataFrame.html" title="class in org.apache.datafusion">DataFrame</a></span> <span class="element-name">fromSubstrait</span><wbr><span class="parameters">(byte[] planBytes)</span></div> |
| <div class="block">Decode a <a href="https://substrait.io/">Substrait</a> <code>Plan</code> message and return a lazy |
| <a href="DataFrame.html" title="class in org.apache.datafusion"><code>DataFrame</code></a>. The plan is not executed until <a href="DataFrame.html#collect(org.apache.arrow.memory.BufferAllocator)"><code>DataFrame.collect(org.apache.arrow.memory.BufferAllocator)</code></a> or <a href="DataFrame.html#executeStream(org.apache.arrow.memory.BufferAllocator)"><code>DataFrame.executeStream(org.apache.arrow.memory.BufferAllocator)</code></a> is called. |
| |
| <p><code>planBytes</code> must be a serialised <code>substrait.proto.Plan</code>. The plan is translated |
| to a DataFusion <a href="DataFrame.html" title="class in org.apache.datafusion"><code>DataFrame</code></a> against this context's catalog: any tables referenced by the |
| plan must already be registered (see <a href="#registerCsv(java.lang.String,java.lang.String)"><code>registerCsv(java.lang.String, java.lang.String)</code></a>, <a href="#registerParquet(java.lang.String,java.lang.String)"><code>registerParquet(java.lang.String, java.lang.String)</code></a>, etc.). |
| |
| <p>This entry point lets Java callers compile plans elsewhere — Calcite via <a href="https://github.com/substrait-io/substrait-java">Isthmus</a>, custom planners, or any |
| other Substrait-emitting tool — and hand them to DataFusion without round-tripping through SQL. |
| |
| <p>Substrait support is gated behind the <code>substrait</code> Cargo feature on the native crate |
| and is <strong>off by default</strong>. Rebuild the native crate with <code>cargo build -p |
| datafusion-jni --features substrait</code> (or <code>... --features substrait,protoc</code> for hermetic |
| builds that vendor <code>protoc</code> via <code>cmake</code>) to enable it. If invoked against a native |
| binary built without the feature, this method throws <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/RuntimeException.html" title="class or interface in java.lang" class="external-link"><code>RuntimeException</code></a> pointing at the |
| flag.</div> |
| <dl class="notes"> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if <code>planBytes</code> is <code>null</code>.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a></code> - if this context is closed.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/RuntimeException.html" title="class or interface in java.lang" class="external-link">RuntimeException</a></code> - if the bytes are not a valid <code>substrait.proto.Plan</code>, if |
| Substrait→DataFusion translation fails (e.g. the plan references an unregistered table), or |
| if the native crate was built without the <code>substrait</code> feature.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="memoryUsage()"> |
| <h3>memoryUsage</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="MemoryUsage.html" title="class in org.apache.datafusion">MemoryUsage</a></span> <span class="element-name">memoryUsage</span>()</div> |
| <div class="block">Snapshot the session's memory pool: bytes currently held and the peak observed since this |
| session was created. Thread-safe; can be polled while queries run. |
| |
| <p>For multi-tenant attribution, place each tenant in its own <a href="SessionContext.html" title="class in org.apache.datafusion"><code>SessionContext</code></a>. Within a |
| single session, the snapshot is the sum across all in-flight queries -- there is no |
| per-DataFrame breakdown today. |
| |
| <p>The session's <code>MemoryPool</code> is wrapped transparently with a tracking adapter at |
| construction time; the wrapper layers on top of whatever pool <a href="SessionContextBuilder.html#memoryLimit(long,double)"><code>SessionContextBuilder.memoryLimit(long, double)</code></a> produced (or DataFusion's default unbounded |
| pool) and does not change pool semantics (limits, eviction, spilling). |
| |
| <p><b>What this counts:</b> bytes reserved against the <code>MemoryPool</code> -- operator state for |
| sorts, hash joins, aggregates, repartition buffers, and anything else that uses DataFusion's |
| <code>MemoryReservation</code> machinery during execution. |
| |
| <p><b>What this does <i>not</i> count:</b> memory held outside the pool, including record-batch |
| buffers materialised by <a href="DataFrame.html#cache()"><code>DataFrame.cache()</code></a> (stored in an in-memory <code>MemTable</code> as |
| plain <code>Vec<RecordBatch></code> with no reservation), record-batch buffers that have crossed the |
| FFI boundary into Arrow's Java allocator, and JVM-side allocations. Operator-level reservations |
| are released as the plan unwinds, so a query that runs to completion typically returns <code> |
| currentBytes</code> to ~0 even if the result set is large.</div> |
| <dl class="notes"> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a></code> - if this context is closed.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/RuntimeException.html" title="class or interface in java.lang" class="external-link">RuntimeException</a></code> - if the native side has not registered a tracker for this handle |
| (should not happen in practice -- tracker registration is done by the constructor).</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="runtimeStats()"> |
| <h3>runtimeStats</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="RuntimeStats.html" title="class in org.apache.datafusion">RuntimeStats</a></span> <span class="element-name">runtimeStats</span>()</div> |
| <div class="block">Snapshot operational counters from the underlying Tokio runtime: worker count, busy time, queue |
| depth, etc. Thread-safe; can be polled while queries run. |
| |
| <p>The runtime is process-wide rather than per-session because the JNI library drives a single |
| shared multi-threaded Tokio runtime. The <a href="SessionContext.html" title="class in org.apache.datafusion"><code>SessionContext</code></a> handle is checked only to |
| ensure the caller still has a live session; the values returned are not session-specific. |
| |
| <p>Requires the <code>runtime-metrics</code> Cargo feature on the native crate (off by default). |
| Rebuild with: |
| |
| <pre><code> |
| RUSTFLAGS="--cfg tokio_unstable" cargo build -p datafusion-jni --features runtime-metrics |
| </code></pre> |
| |
| <p>If invoked against a native binary built without the feature, this method throws <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/RuntimeException.html" title="class or interface in java.lang" class="external-link"><code>RuntimeException</code></a> with a message pointing at the rebuild command.</div> |
| <dl class="notes"> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a></code> - if this context is closed.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/RuntimeException.html" title="class or interface in java.lang" class="external-link">RuntimeException</a></code> - if the native crate was built without the <code>runtime-metrics</code> |
| feature.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="tableSchema(java.lang.String)"> |
| <h3>tableSchema</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">org.apache.arrow.vector.types.pojo.Schema</span> <span class="element-name">tableSchema</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> tableName)</span></div> |
| <div class="block">Return the Arrow <code>Schema</code> of a registered table. Transferred via Arrow IPC; no <code>BufferAllocator</code> is required because a schema carries no buffer data.</div> |
| <dl class="notes"> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/RuntimeException.html" title="class or interface in java.lang" class="external-link">RuntimeException</a></code> - if <code>tableName</code> is not registered in this context.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getOption(java.lang.String)"> |
| <h3>getOption</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name">getOption</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> key)</span></div> |
| <div class="block">Read the current value of a <code>datafusion.*</code> config key. The key must be one DataFusion |
| recognises (see <a href="SessionContextBuilder.html#setOption(java.lang.String,java.lang.String)"><code>SessionContextBuilder.setOption(String, String)</code></a> for examples and the |
| upstream configuration reference for the full list). |
| |
| <p><code>datafusion.runtime.*</code> keys (memory limit, temp directory, cache sizes, etc) are not |
| yet supported by this getter and will throw. Use the typed <a href="SessionContextBuilder.html#memoryLimit(long,double)"><code>SessionContextBuilder.memoryLimit(long, double)</code></a> and <a href="SessionContextBuilder.html#tempDirectory(java.lang.String)"><code>SessionContextBuilder.tempDirectory(String)</code></a> setters at construction time instead. Round-trip |
| support for the runtime subtree is tracked as a follow-up.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the current value as a string, or <code>null</code> if the key is recognised but has no |
| value set and no default.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if <code>key</code> is <code>null</code>.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/RuntimeException.html" title="class or interface in java.lang" class="external-link">RuntimeException</a></code> - if the key is not recognised by DataFusion or is in the <code> |
| datafusion.runtime.*</code> subtree.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a></code> - if this context is closed.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="registerCsv(java.lang.String,java.lang.String)"> |
| <h3>registerCsv</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">registerCsv</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> name, |
| <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> path)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="registerCsv(java.lang.String,java.lang.String,org.apache.datafusion.CsvReadOptions)"> |
| <h3>registerCsv</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">registerCsv</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> name, |
| <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> path, |
| <a href="CsvReadOptions.html" title="class in org.apache.datafusion">CsvReadOptions</a> options)</span></div> |
| <div class="block">Register a CSV file (or directory of CSV files) as a table with the supplied <a href="CsvReadOptions.html" title="class in org.apache.datafusion"><code>CsvReadOptions</code></a>.</div> |
| <dl class="notes"> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/RuntimeException.html" title="class or interface in java.lang" class="external-link">RuntimeException</a></code> - if registration fails (path not found, schema inference error, etc.).</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="readCsv(java.lang.String)"> |
| <h3>readCsv</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="DataFrame.html" title="class in org.apache.datafusion">DataFrame</a></span> <span class="element-name">readCsv</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> path)</span></div> |
| <div class="block">Read a CSV file as a <a href="DataFrame.html" title="class in org.apache.datafusion"><code>DataFrame</code></a> without registering it.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="readCsv(java.lang.String,org.apache.datafusion.CsvReadOptions)"> |
| <h3>readCsv</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="DataFrame.html" title="class in org.apache.datafusion">DataFrame</a></span> <span class="element-name">readCsv</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> path, |
| <a href="CsvReadOptions.html" title="class in org.apache.datafusion">CsvReadOptions</a> options)</span></div> |
| <div class="block">Read a CSV file as a <a href="DataFrame.html" title="class in org.apache.datafusion"><code>DataFrame</code></a> with the supplied <a href="CsvReadOptions.html" title="class in org.apache.datafusion"><code>CsvReadOptions</code></a>.</div> |
| <dl class="notes"> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/RuntimeException.html" title="class or interface in java.lang" class="external-link">RuntimeException</a></code> - if the read fails.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="registerJson(java.lang.String,java.lang.String)"> |
| <h3>registerJson</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">registerJson</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> name, |
| <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> path)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="registerJson(java.lang.String,java.lang.String,org.apache.datafusion.NdJsonReadOptions)"> |
| <h3>registerJson</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">registerJson</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> name, |
| <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> path, |
| <a href="NdJsonReadOptions.html" title="class in org.apache.datafusion">NdJsonReadOptions</a> options)</span></div> |
| <div class="block">Register a newline-delimited JSON file (or directory of NDJSON files) as a table with the |
| supplied <a href="NdJsonReadOptions.html" title="class in org.apache.datafusion"><code>NdJsonReadOptions</code></a>.</div> |
| <dl class="notes"> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/RuntimeException.html" title="class or interface in java.lang" class="external-link">RuntimeException</a></code> - if registration fails (path not found, schema inference error, etc.).</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="readJson(java.lang.String)"> |
| <h3>readJson</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="DataFrame.html" title="class in org.apache.datafusion">DataFrame</a></span> <span class="element-name">readJson</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> path)</span></div> |
| <div class="block">Read a newline-delimited JSON file as a <a href="DataFrame.html" title="class in org.apache.datafusion"><code>DataFrame</code></a> without registering it.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="readJson(java.lang.String,org.apache.datafusion.NdJsonReadOptions)"> |
| <h3>readJson</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="DataFrame.html" title="class in org.apache.datafusion">DataFrame</a></span> <span class="element-name">readJson</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> path, |
| <a href="NdJsonReadOptions.html" title="class in org.apache.datafusion">NdJsonReadOptions</a> options)</span></div> |
| <div class="block">Read a newline-delimited JSON file as a <a href="DataFrame.html" title="class in org.apache.datafusion"><code>DataFrame</code></a> with the supplied <a href="NdJsonReadOptions.html" title="class in org.apache.datafusion"><code>NdJsonReadOptions</code></a>.</div> |
| <dl class="notes"> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/RuntimeException.html" title="class or interface in java.lang" class="external-link">RuntimeException</a></code> - if the read fails.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="registerParquet(java.lang.String,java.lang.String)"> |
| <h3>registerParquet</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">registerParquet</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> name, |
| <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> path)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="registerParquet(java.lang.String,java.lang.String,org.apache.datafusion.ParquetReadOptions)"> |
| <h3>registerParquet</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">registerParquet</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> name, |
| <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> path, |
| <a href="ParquetReadOptions.html" title="class in org.apache.datafusion">ParquetReadOptions</a> options)</span></div> |
| <div class="block">Register a parquet file as a table with the supplied <a href="ParquetReadOptions.html" title="class in org.apache.datafusion"><code>ParquetReadOptions</code></a>.</div> |
| <dl class="notes"> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/RuntimeException.html" title="class or interface in java.lang" class="external-link">RuntimeException</a></code> - if registration fails (path not found, schema mismatch, etc.).</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="readParquet(java.lang.String)"> |
| <h3>readParquet</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="DataFrame.html" title="class in org.apache.datafusion">DataFrame</a></span> <span class="element-name">readParquet</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> path)</span></div> |
| <div class="block">Read a parquet file as a <a href="DataFrame.html" title="class in org.apache.datafusion"><code>DataFrame</code></a> without registering it.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="readParquet(java.lang.String,org.apache.datafusion.ParquetReadOptions)"> |
| <h3>readParquet</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="DataFrame.html" title="class in org.apache.datafusion">DataFrame</a></span> <span class="element-name">readParquet</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> path, |
| <a href="ParquetReadOptions.html" title="class in org.apache.datafusion">ParquetReadOptions</a> options)</span></div> |
| <div class="block">Read a parquet file as a <a href="DataFrame.html" title="class in org.apache.datafusion"><code>DataFrame</code></a> with the supplied <a href="ParquetReadOptions.html" title="class in org.apache.datafusion"><code>ParquetReadOptions</code></a>.</div> |
| <dl class="notes"> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/RuntimeException.html" title="class or interface in java.lang" class="external-link">RuntimeException</a></code> - if the read fails.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="registerArrow(java.lang.String,java.lang.String)"> |
| <h3>registerArrow</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">registerArrow</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> name, |
| <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> path)</span></div> |
| <div class="block">Register an Arrow IPC file (or directory of Arrow IPC files) as a table.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="registerArrow(java.lang.String,java.lang.String,org.apache.datafusion.ArrowReadOptions)"> |
| <h3>registerArrow</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">registerArrow</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> name, |
| <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> path, |
| <a href="ArrowReadOptions.html" title="class in org.apache.datafusion">ArrowReadOptions</a> options)</span></div> |
| <div class="block">Register an Arrow IPC file (or directory of Arrow IPC files) as a table with the supplied |
| <a href="ArrowReadOptions.html" title="class in org.apache.datafusion"><code>ArrowReadOptions</code></a>.</div> |
| <dl class="notes"> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if any of <code>name</code>, <code>path</code>, or <code>options</code> is |
| <code>null</code>.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/RuntimeException.html" title="class or interface in java.lang" class="external-link">RuntimeException</a></code> - if registration fails (path not found, schema mismatch, etc.).</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="readArrow(java.lang.String)"> |
| <h3>readArrow</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="DataFrame.html" title="class in org.apache.datafusion">DataFrame</a></span> <span class="element-name">readArrow</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> path)</span></div> |
| <div class="block">Read an Arrow IPC file as a <a href="DataFrame.html" title="class in org.apache.datafusion"><code>DataFrame</code></a> without registering it.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="readArrow(java.lang.String,org.apache.datafusion.ArrowReadOptions)"> |
| <h3>readArrow</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="DataFrame.html" title="class in org.apache.datafusion">DataFrame</a></span> <span class="element-name">readArrow</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> path, |
| <a href="ArrowReadOptions.html" title="class in org.apache.datafusion">ArrowReadOptions</a> options)</span></div> |
| <div class="block">Read an Arrow IPC file as a <a href="DataFrame.html" title="class in org.apache.datafusion"><code>DataFrame</code></a> with the supplied <a href="ArrowReadOptions.html" title="class in org.apache.datafusion"><code>ArrowReadOptions</code></a>.</div> |
| <dl class="notes"> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if <code>path</code> or <code>options</code> is <code>null</code>.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/RuntimeException.html" title="class or interface in java.lang" class="external-link">RuntimeException</a></code> - if the read fails.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="registerAvro(java.lang.String,java.lang.String)"> |
| <h3>registerAvro</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">registerAvro</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> name, |
| <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> path)</span></div> |
| <div class="block">Register an Avro file (or directory of Avro files) as a table.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="registerAvro(java.lang.String,java.lang.String,org.apache.datafusion.AvroReadOptions)"> |
| <h3>registerAvro</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">registerAvro</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> name, |
| <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> path, |
| <a href="AvroReadOptions.html" title="class in org.apache.datafusion">AvroReadOptions</a> options)</span></div> |
| <div class="block">Register an Avro file (or directory of Avro files) as a table with the supplied <a href="AvroReadOptions.html" title="class in org.apache.datafusion"><code>AvroReadOptions</code></a>.</div> |
| <dl class="notes"> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if any of <code>name</code>, <code>path</code>, or <code>options</code> is |
| <code>null</code>.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/RuntimeException.html" title="class or interface in java.lang" class="external-link">RuntimeException</a></code> - if registration fails (path not found, schema mismatch, etc.).</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="readAvro(java.lang.String)"> |
| <h3>readAvro</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="DataFrame.html" title="class in org.apache.datafusion">DataFrame</a></span> <span class="element-name">readAvro</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> path)</span></div> |
| <div class="block">Read an Avro file as a <a href="DataFrame.html" title="class in org.apache.datafusion"><code>DataFrame</code></a> without registering it.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="readAvro(java.lang.String,org.apache.datafusion.AvroReadOptions)"> |
| <h3>readAvro</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="DataFrame.html" title="class in org.apache.datafusion">DataFrame</a></span> <span class="element-name">readAvro</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> path, |
| <a href="AvroReadOptions.html" title="class in org.apache.datafusion">AvroReadOptions</a> options)</span></div> |
| <div class="block">Read an Avro file as a <a href="DataFrame.html" title="class in org.apache.datafusion"><code>DataFrame</code></a> with the supplied <a href="AvroReadOptions.html" title="class in org.apache.datafusion"><code>AvroReadOptions</code></a>.</div> |
| <dl class="notes"> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if <code>path</code> or <code>options</code> is <code>null</code>.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/RuntimeException.html" title="class or interface in java.lang" class="external-link">RuntimeException</a></code> - if the read fails.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="registerUdf(org.apache.datafusion.ScalarUdf)"> |
| <h3>registerUdf</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">registerUdf</span><wbr><span class="parameters">(<a href="ScalarUdf.html" title="class in org.apache.datafusion">ScalarUdf</a> udf)</span></div> |
| <div class="block">Register a Java-implemented scalar UDF. After registration, the function can be invoked by SQL |
| via the UDF's name or referenced in DataFusion plans deserialised with <a href="#fromProto(byte%5B%5D)"><code>fromProto(byte[])</code></a>. |
| |
| <p>The UDF is registered with an exact signature: the runtime will reject calls whose argument |
| types do not match the declared <a href="ScalarFunction.html#argFields()"><code>ScalarFunction.argFields()</code></a> exactly.</div> |
| <dl class="notes"> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/RuntimeException.html" title="class or interface in java.lang" class="external-link">RuntimeException</a></code> - if registration fails (e.g., name already registered with an |
| incompatible signature, schema serialisation failure).</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="registerTable(java.lang.String,org.apache.datafusion.TableProvider)"> |
| <h3>registerTable</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">registerTable</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> name, |
| <a href="TableProvider.html" title="interface in org.apache.datafusion">TableProvider</a> provider)</span></div> |
| <div class="block">Register a Java-implemented <a href="TableProvider.html" title="interface in org.apache.datafusion"><code>TableProvider</code></a> under <code>name</code>. SQL queries that |
| reference <code>name</code> call back into <code>provider</code> to fetch batches. |
| |
| <p><a href="TableProvider.html#schema()"><code>TableProvider.schema()</code></a> is called once here, on the calling thread, and cached on the |
| native side. <a href="TableProvider.html#scan(org.apache.arrow.memory.BufferAllocator)"><code>TableProvider.scan(org.apache.arrow.memory.BufferAllocator)</code></a> is called once |
| per query that touches the table, on a Tokio worker thread; it must return a fresh, independent |
| <code>ArrowReader</code> on every call, with its buffers allocated from |
| the <code>BufferAllocator</code> the framework supplies. |
| |
| <p>This is the Java counterpart to DataFusion's Rust <code>SessionContext::register_table</code>.</div> |
| <dl class="notes"> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if <code>name</code> or <code>provider</code> is <code>null</code>.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a></code> - if <code>provider.schema()</code> returns <code>null</code>, or this |
| context is closed.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/RuntimeException.html" title="class or interface in java.lang" class="external-link">RuntimeException</a></code> - if native registration fails.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="tableExists(java.lang.String)"> |
| <h3>tableExists</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">tableExists</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> name)</span></div> |
| <div class="block">Returns <code>true</code> if a table with the given name is registered in this session. |
| |
| <p>This is the Java counterpart to DataFusion's Rust <code>SessionContext::table_exist</code>.</div> |
| <dl class="notes"> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a></code> - if this context is closed.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="deregisterTable(java.lang.String)"> |
| <h3>deregisterTable</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">deregisterTable</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> name)</span></div> |
| <div class="block">Removes the table with the given name from this session. Does nothing if no table with that |
| name is registered. |
| |
| <p>This is the Java counterpart to DataFusion's Rust <code>SessionContext::deregister_table</code>.</div> |
| <dl class="notes"> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a></code> - if this context is closed.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="close()"> |
| <h3>close</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">close</span>()</div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/AutoCloseable.html#close()" title="class or interface in java.lang" class="external-link">close</a></code> in interface <code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/AutoCloseable.html" title="class or interface in java.lang" class="external-link">AutoCloseable</a></code></dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| <footer role="contentinfo"> |
| <hr> |
| <p class="legal-copy"><small>Copyright © 2026. All rights reserved.</small></p> |
| </footer> |
| </div> |
| </div> |
| </body> |
| </html> |