-
Notifications
You must be signed in to change notification settings - Fork 173
feat(rust): add public abstract API and dummy driver implementation #1725
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
Conversation
paleolimbot
left a comment
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.
Awesome! I'm happy to take a few passes on the non-Rust specific stuff 🙂
From CI I see:
Check for unapproved licenses............................................Failed
- hook id: apache-rat
- exit code: 1
~/work/arrow-adbc/arrow-adbc ~/work/arrow-adbc/arrow-adbc
NOT APPROVED: rust2/Cargo.toml (adbc/rust2/Cargo.toml): false
NOT APPROVED: rust2/README.md (adbc/rust2/README.md): false
NOT APPROVED: rust2/core/Cargo.toml (adbc/rust2/core/Cargo.toml): false
NOT APPROVED: rust2/core/src/error.rs (adbc/rust2/core/src/error.rs): false
NOT APPROVED: rust2/core/src/ffi/constants.rs (adbc/rust2/core/src/ffi/constants.rs): false
NOT APPROVED: rust2/core/src/ffi/mod.rs (adbc/rust2/core/src/ffi/mod.rs): false
NOT APPROVED: rust2/core/src/ffi/types.rs (adbc/rust2/core/src/ffi/types.rs): false
NOT APPROVED: rust2/core/src/lib.rs (adbc/rust2/core/src/lib.rs): false
NOT APPROVED: rust2/core/src/options.rs (adbc/rust2/core/src/options.rs): false
NOT APPROVED: rust2/core/src/schemas.rs (adbc/rust2/core/src/schemas.rs): false
NOT APPROVED: rust2/drivers/dummy/Cargo.toml (adbc/rust2/drivers/dummy/Cargo.toml): false
NOT APPROVED: rust2/drivers/dummy/src/lib.rs (adbc/rust2/drivers/dummy/src/lib.rs): false
12 unapproved licences. Check rat report: rat.txt
...in order to get this to go away you'll have to add the Apache license header to your files:
Lines 1 to 16 in aa04aad
| // Licensed to the Apache Software Foundation (ASF) under one | |
| // or more contributor license agreements. See the NOTICE file | |
| // distributed with this work for additional information | |
| // regarding copyright ownership. The ASF licenses this file | |
| // to you under the Apache License, Version 2.0 (the | |
| // "License"); you may not use this file except in compliance | |
| // with the License. You may obtain a copy of the License at | |
| // | |
| // http://www.apache.org/licenses/LICENSE-2.0 | |
| // | |
| // Unless required by applicable law or agreed to in writing, | |
| // software distributed under the License is distributed on an | |
| // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
| // KIND, either express or implied. See the License for the | |
| // specific language governing permissions and limitations | |
| // under the License. |
It will probably also help reviewers to see the results of a CI run. Would it be appropriate to modify https://github.com/apache/arrow-adbc/blob/aa04aadccd319e6fa3abb07154fa8d87b58d5c21/.github/workflows/rust.yml to also run for this directory?
|
Thanks for taking time to review! I've added the licence header to all files. The CI is now green. I'm not very familiar with Github Actions so I need a bit more time to read doc before integrating the new folder to CI. |
aljazerzen
left a comment
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.
I've left a few comments about what I would expect the API to be from the "Rust developer" standpoint. We need to find a balance between making the Rust API similar to the C API and making it "ideomatic". With this I mean that it would be hard to misuse it and that it would be well organized, so it is easy to discover and use.
The final CI may be a bit different, but for the purposes of getting the review started, perhaps just modify: arrow-adbc/.github/workflows/rust.yml Line 41 in aa04aad
...such that it reads |
mbrobbel
left a comment
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.
Thanks, this looks great.
I put the code in /rust2 but I can move it to /rust if you prefer.
+1 to just move this to /rust.
I'm not very familiar with Github Actions so I need a bit more time to read doc before integrating the new folder to CI.
I can help figure out CI in follow-up PRs.
mbrobbel
left a comment
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.
My final suggestion/nit: move this to rust (instead of rust2).
|
Should be ready to merge now! Next PR: full FFI bindings @mbrobbel If you have time, I think that you can work on the CI in parallel (there shouldn't be any conflict) |
|
I'll merge this in a day or two if there's no further comments. Thanks @alexandreyc! |
|
Augh, I forgot to edit out the pings from the commit message... |
…pache#1725) Hey! As discussed in apache#1723, here is the first PR of the new complete Rust implementation. It includes: - Traits and structs definitions for the public abstract API - An implementation of a dummy driver for testing purposes (no test currently because we need the driver manager and exporter to have relevant tests) - Constants from `adbc.h` I put the code in `/rust2` but I can move it to `/rust` if you prefer. CC @mbrobbel @paleolimbot @zeroshade @lidavidm
…pache#1725) Hey! As discussed in apache#1723, here is the first PR of the new complete Rust implementation. It includes: - Traits and structs definitions for the public abstract API - An implementation of a dummy driver for testing purposes (no test currently because we need the driver manager and exporter to have relevant tests) - Constants from `adbc.h` I put the code in `/rust2` but I can move it to `/rust` if you prefer. CC @mbrobbel @paleolimbot @zeroshade @lidavidm
…pache#1725) Hey! As discussed in apache#1723, here is the first PR of the new complete Rust implementation. It includes: - Traits and structs definitions for the public abstract API - An implementation of a dummy driver for testing purposes (no test currently because we need the driver manager and exporter to have relevant tests) - Constants from `adbc.h` I put the code in `/rust2` but I can move it to `/rust` if you prefer. CC @mbrobbel @paleolimbot @zeroshade @lidavidm
As discussed in #1725 (comment), we can now use the `arrow-*` subcrates. This also bumps these `arrow` crates to the latest release. This is a breaking change for the `adbc_core` crate.
Hey!
As discussed in #1723, here is the first PR of the new complete Rust implementation.
It includes:
adbc.hI put the code in
/rust2but I can move it to/rustif you prefer.CC @mbrobbel @paleolimbot @zeroshade @lidavidm