Skip to content

Conversation

@alexandreyc
Copy link
Contributor

Hey!

As discussed in #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

Copy link
Member

@paleolimbot paleolimbot left a 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:

// 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?

@alexandreyc
Copy link
Contributor Author

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.

Copy link

@aljazerzen aljazerzen left a 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.

@paleolimbot
Copy link
Member

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.

The final CI may be a bit different, but for the purposes of getting the review started, perhaps just modify:

working-directory: rust

...such that it reads working-directory: rust2

Copy link
Member

@mbrobbel mbrobbel left a 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.

Copy link
Member

@mbrobbel mbrobbel left a 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).

@alexandreyc alexandreyc requested a review from wjones127 as a code owner April 18, 2024 13:35
@alexandreyc
Copy link
Contributor Author

alexandreyc commented Apr 18, 2024

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)

@lidavidm
Copy link
Member

I'll merge this in a day or two if there's no further comments. Thanks @alexandreyc!

@lidavidm
Copy link
Member

Augh, I forgot to edit out the pings from the commit message...

@mbrobbel
Copy link
Member

@mbrobbel If you have time, I think that you can work on the CI in parallel (there shouldn't be any conflict)

#1749

cocoa-xu pushed a commit to cocoa-xu/arrow-adbc that referenced this pull request Apr 24, 2024
…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
davidhcoe pushed a commit to davidhcoe/arrow-adbc that referenced this pull request Apr 25, 2024
…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
cocoa-xu pushed a commit to meowcraft-dev/arrow-adbc that referenced this pull request May 8, 2024
…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
lidavidm pushed a commit that referenced this pull request Oct 8, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants