Skip to content

datafusion-contrib/datafusion-c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DataFusion C API

C language bindings for DataFusion.

Examples

How to run

Build libdatafusion.so:

cargo build

C example:

cc \
  -o target/debug/sql \
  -I datafusion/c/include \
  datafusion/c/examples/sql.c \
  -L target/debug \
  -Wl,--rpath=target/debug \
  -ldatafusion
target/debug/sql

Output:

+----------+
| Int64(1) |
+----------+
| 1        |
+----------+

Python example:

LD_LIBRARY_PATH=$PWD/target/debug datafusion/c/examples/sql.py

Output:

+----------+
| Int64(1) |
+----------+
| 1        |
+----------+

Ruby example:

LD_LIBRARY_PATH=$PWD/target/debug datafusion/c/examples/sql.rb

Output:

+----------+
| Int64(1) |
+----------+
| 1        |
+----------+