# Apache DataFusion Java
Java bindings for [Apache DataFusion]. Queries run in native Rust and results
return to the JVM as [Apache Arrow] batches via the Arrow C Data Interface.
[Apache DataFusion]: https://datafusion.apache.org/
[Apache Arrow]: https://arrow.apache.org/
> Early development: the API will change between releases. Bug reports
> and contributions welcome.
## Quickstart
```java
import org.apache.arrow.memory.RootAllocator;
import org.apache.arrow.vector.ipc.ArrowReader;
import org.apache.datafusion.DataFrame;
import org.apache.datafusion.SessionContext;
try (var allocator = new RootAllocator();
var ctx = new SessionContext()) {
ctx.registerParquet("orders", "/path/to/orders.parquet");
try (DataFrame df = ctx.sql(
"SELECT o_orderpriority, COUNT(*) AS n " +
"FROM orders GROUP BY o_orderpriority");
ArrowReader reader = df.collect(allocator)) {
while (reader.loadNextBatch()) {
var batch = reader.getVectorSchemaRoot();
// ...
}
}
}
```
See the [User Guide](user-guide/index.md) for installation, the DataFrame and
SQL APIs, and Parquet ingestion. See the [Contributor Guide](contributor-guide/index.md)
for build, test, and release workflows.
```{toctree}
:maxdepth: 1
:caption: Links
:hidden:
GitHub Repository
Issue Tracker
Apache DataFusion
Code of Conduct
```
```{toctree}
:maxdepth: 2
:caption: Documentation
:hidden:
User Guide
Contributor Guide
```