You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/04/26 18:03:25 UTC

[GitHub] [arrow] durch opened a new pull request #7042: ARROW-8597 [Rust] Lints and readability improvements for arrow crate

durch opened a new pull request #7042:
URL: https://github.com/apache/arrow/pull/7042


   + Pedantic fixes to `unsafe`
   + Changes to function arguments to pass in references or values as appropriate
   + Refactor pointer arithmetic to use `usize` instead of `isize` casting
   + Ignore generated code clippy warnings
   + Refactor loops to use iterators where appropriate
   + Remove unnecessary `return` statements
   + Remove unnecessary `clone` statements
   + Remove unnecessary closures
   + A bunch of similar small scale refactorings
   
   Tests below are currently failing on master locally as well with `ARROW_TEST_DATA not defined: NotPresent`, assuming that is ok for now:
   
   ```
   ipc::reader::tests::read_generated_files
   ipc::reader::tests::read_generated_streams
   ipc::writer::tests::read_and_rewrite_generated_files
   ipc::writer::tests::read_and_rewrite_generated_streams
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] markhildreth commented on pull request #7042: ARROW-8597 [Rust] Lints and readability improvements for arrow crate

Posted by GitBox <gi...@apache.org>.
markhildreth commented on pull request #7042:
URL: https://github.com/apache/arrow/pull/7042#issuecomment-620688091


   @durch Re: "ARROW_TEST_DATA not defined", the [`/rust/README.md`](https://github.com/apache/arrow/tree/master/rust#prerequisites) file in the repo has some additional steps needed to get access to those test files locally. Basically...
   
   ```
   git submodule update --init
   ```
   
   ...then run `cargo test` with these environment variables set:
   
   ```
   PARQUET_TEST_DATA=/path/to/arrow/cpp/submodules/parquet-testing/data
   ARROW_TEST_DATA=/path/to/arrow/testing/data/
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] durch commented on pull request #7042: ARROW-8597 [Rust] Lints and readability improvements for arrow crate

Posted by GitBox <gi...@apache.org>.
durch commented on pull request #7042:
URL: https://github.com/apache/arrow/pull/7042#issuecomment-619798711


   @nevi-me I left it as is for now, did not want to actually write any new code in this PR. After this one gets merged I'll make another pass and write some code, in addition to the `is_empty` there is also a low hanging `Default` impl, possibly a few more pedantic changes :).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] github-actions[bot] commented on pull request #7042: ARROW-8597 [Rust] Lints and readability improvements for arrow crate

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #7042:
URL: https://github.com/apache/arrow/pull/7042#issuecomment-619599024


   https://issues.apache.org/jira/browse/ARROW-8597


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] paddyhoran commented on a change in pull request #7042: ARROW-8597 [Rust] Lints and readability improvements for arrow crate

Posted by GitBox <gi...@apache.org>.
paddyhoran commented on a change in pull request #7042:
URL: https://github.com/apache/arrow/pull/7042#discussion_r415478926



##########
File path: rust/arrow/src/util/bit_util.rs
##########
@@ -75,7 +75,8 @@ pub fn set_bit(data: &mut [u8], i: usize) {
 /// responsible to guarantee that `i` is within bounds.
 #[inline]
 pub unsafe fn set_bit_raw(data: *mut u8, i: usize) {
-    *data.offset((i >> 3) as isize) |= BIT_MASK[i & 7]
+    // *data.offset((i >> 3) as isize) |= BIT_MASK[i & 7]

Review comment:
       Remove old code in comment.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org