-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add python binding and integrate with datafusion-python #3
Conversation
result = ctx.sql( | ||
"SELECT region, balloon_id, event_minute, temperature, \"_timestamp\" FROM weather_balloons where region = 'us-west2' and balloon_id IN ('3698') and event_minute BETWEEN '2021-03-05-1200' AND '2021-03-05-1201' ORDER BY \"_timestamp\"" | ||
).collect() | ||
assert result.to_pydict() == {} |
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.
TODO: compile successfully locally (macOS) and fix this test expect output
python/Cargo.toml
Outdated
pyo3 = { version = "~0.15", features = ["extension-module"] } | ||
tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread", "sync"] } | ||
datafusion = { version = "^7.0.0", features = ["pyarrow"] } | ||
datafusion-python = { git = "https://github.com/jychen7/datafusion-python", branch = "register-table" } |
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.
|
||
[packages] | ||
maturin = "==0.12.11" | ||
datafusion = "==0.5.1" |
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.
upgrade to new version after PR datafusion-contrib/datafusion-python#46
The PR doesn't work because of limitation of pyo3 cross package inheritance detail can be found here |
depends on datafusion-contrib/datafusion-python#46
PyBigtableTable is a subclass of PyTable (in pyo3 word, it
extends=PyTable
)