-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement minimal API #1
Conversation
edition = "2021" | ||
rust-version = "1.59" | ||
exclude = [ | ||
"/cpp/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this ignored?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/cpp/
is just for reusing archery
in apache/arrow. It's not needed for packaging.
See also the comment in cpp/CMakeLists.txt
: https://github.com/datafusion-contrib/datafusion-c/pull/1/files#diff-1bba462ab050e89360fd88110a689e85ee037749cea091a1848ab574381d3795R18
# This is just for mimicking apache/arrow repository to use "archery lint --rat".
|
||
C example: | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``` | |
```bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
datafusion.df_data_frame_show.argtypes = [ctypes.c_void_p, ctypes.c_void_p] | ||
datafusion.df_data_frame_show.restype = None | ||
|
||
context = datafusion.df_session_context_new() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wonder if this can be used with context manager
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can do it but I think that we shouldn't do it. I want to keep the example as simple as possible to show how to use FFI features to use this C API. The example isn't intended to be used by users directly. (Python users should use datafusion-python instead.)
i merged this as-is. there are some possibility of improvements but it can happen in subsequent pull requests as the GitHub action needs to be in effect first. |
See also: apache/datafusion#2622