DataFusionSharp 0.1.1
dotnet add package DataFusionSharp --version 0.1.1
NuGet\Install-Package DataFusionSharp -Version 0.1.1
<PackageReference Include="DataFusionSharp" Version="0.1.1" />
<PackageVersion Include="DataFusionSharp" Version="0.1.1" />
<PackageReference Include="DataFusionSharp" />
paket add DataFusionSharp --version 0.1.1
#r "nuget: DataFusionSharp, 0.1.1"
#:package DataFusionSharp@0.1.1
#addin nuget:?package=DataFusionSharp&version=0.1.1
#tool nuget:?package=DataFusionSharp&version=0.1.1
DataFusionSharp
.NET bindings for Apache DataFusion, a fast, extensible query engine built on Apache Arrow for high-performance analytical query processing.
Note: This is an independent community project and is not officially associated with or endorsed by the Apache Software Foundation or the Apache DataFusion project.
Features
| Component | Feature | Status | Notes |
|---|---|---|---|
| Runtime | Create Tokio runtime | ✅ | Configurable threads |
| Graceful shutdown | ✅ | ||
| Multiple runtime instances | ✅ | ||
| Session | Create session context | ✅ | |
| Execute SQL queries | ✅ | Returns DataFrame | |
| Data Sources | |||
| CSV read | 🟡 | Basic, no options exposed | |
| CSV write | 🟡 | Basic, no options exposed | |
| Parquet read | 🟡 | Basic, no options exposed | |
| Parquet write | 🟡 | Basic, no options exposed | |
| JSON read | 🟡 | Basic, no options exposed | |
| JSON write | 🟡 | Basic, no options exposed | |
| In-memory tables | ❌ | ||
| DataFrame | |||
| Count rows | ✅ | CountAsync() |
|
| Get schema | ✅ | GetSchemaAsync() → Arrow Schema |
|
| Collect all data | ✅ | CollectAsync() → RecordBatches |
|
| Stream results | ✅ | ExecuteStreamAsync() → IAsyncEnumerable |
|
| Show/print | ✅ | ShowAsync(), ToStringAsync() |
|
| Select, Aggregate, Join, Filter, Limit, Sort | ❌ | Use SQL instead | |
| Explain plan | ❌ | ||
| Write to file | ❌ | ||
| Arrow | Apache Arrow support | ✅ | Via Apache.Arrow nuget package |
| Advanced | |||
| UDF registration | ❌ | ||
| Catalog management | ❌ | ||
| Table providers | ❌ | ||
| Platforms | Linux x64 | ✅ | |
| Linux arm64 | ❌ | ||
| Windows x64 | ❌ | ||
| macOS arm64 | ❌ |
✅ Implemented 🟡 Partially implemented ❌ Not yet implemented
Installation
dotnet add package DataFusionSharp
Quick Start
using DataFusionSharp;
await using var runtime = DataFusionRuntime.Create();
using var context = runtime.CreateSessionContext();
// Register a CSV file as a table
await context.RegisterCsvAsync("orders", "path/to/orders.csv");
// Execute SQL query
using var df = await context.SqlAsync(
"SELECT customer_id, sum(amount) AS total FROM orders GROUP BY customer_id");
// Display results to console
await df.ShowAsync();
// Access schema
var schema = await df.GetSchemaAsync();
foreach (var field in schema.FieldsList)
Console.WriteLine($"- {field.Name}: {field.DataType}");
// Collect as Arrow batches
var data = await df.CollectAsync();
foreach (var batch in data.Batches)
{
// Process Arrow RecordBatch...
}
Requirements
- .NET 8.0 or later
- Supported platforms:
- Linux (x64, ARM64) 🚧 Planned
- Windows (x64) 🚧 Planned
- macOS (ARM64) 🚧 Planned
Building from Source
Prerequisites
- .NET 10.0 SDK or later
- Rust toolchain (1.93+) - Install from https://rustup.rs
Build Steps
Clone the repository:
git clone https://github.com/nazarii-piontko/datafusion-sharp.git cd datafusion-sharpBuild the project:
dotnet build -c ReleaseThis will automatically:
- Compile the Rust native library (via cargo)
- Build the .NET library
- Link the native library into the managed library
Run tests:
dotnet test -c Release(Optional) Run benchmarks:
cd tests/DataFusionSharp.Benchmark dotnet run -c ReleaseFor detailed benchmark results, see the Benchmark README.
Documentation
TODO: Link to or provide documentation for the library
Project Structure
- src/DataFusionSharp/ - Core .NET library with managed wrappers
- native/ - Rust FFI layer bridging .NET to Apache DataFusion
- tests/DataFusionSharp.Tests/ - Integration tests
- tests/DataFusionSharp.Benchmark/ - Performance benchmarks with native reference implementation
- examples/ - Example usage and sample data
Contributing
Contributions are welcome! Please read our Contributing Guide for details on our code of conduct and the process for submitting pull requests.
License
DataFusionSharp is licensed under the Apache License 2.0. See LICENSE.txt for details.
This project contains bindings to Apache DataFusion, which is also licensed under Apache License 2.0. See NOTICE.txt for attribution details.
Acknowledgments
- Apache DataFusion - The underlying query engine
- Apache Arrow - Columnar memory format
- The Apache Software Foundation
Related Projects
- Apache DataFusion - Rust implementation
- datafusion-python - Python bindings
- datafusion-java - Java bindings
Apache®, Apache DataFusion™, Apache Arrow™, and the Apache feather logo are trademarks of The Apache Software Foundation.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Apache.Arrow (>= 22.1.0)
-
net8.0
- Apache.Arrow (>= 22.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.1 | 94 | 2/8/2026 |