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 2022/05/06 12:24:43 UTC

[GitHub] [arrow-rs] HaoYang670 opened a new pull request, #1664: Replace `fn is_large` by `const IS_LARGE`

HaoYang670 opened a new pull request, #1664:
URL: https://github.com/apache/arrow-rs/pull/1664

   Signed-off-by: remzi <13...@gmail.com>
   
   # Which issue does this PR close?
   
   <!---
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   Closes #1658 .
   
   # What changes are included in this PR?
   Replace `fn is_large` by `const IS_LARGE`.
   
   Unfortunately, we still can't declare `BinaryArray::get_data_type` as `const fn`. Please look at the docs.
   
   # Are there any user-facing changes?
   No.
   


-- 
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.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-rs] viirya commented on a diff in pull request #1664: Replace `fn is_large` with `const IS_LARGE`

Posted by GitBox <gi...@apache.org>.
viirya commented on code in PR #1664:
URL: https://github.com/apache/arrow-rs/pull/1664#discussion_r867286149


##########
arrow/src/array/array_binary.rs:
##########
@@ -44,8 +44,11 @@ pub struct GenericBinaryArray<OffsetSize: OffsetSizeTrait> {
 }
 
 impl<OffsetSize: OffsetSizeTrait> GenericBinaryArray<OffsetSize> {
+    /// Get the data type of the array.
+    // Declare this function as `pub const fn` after
+    // https://github.com/rust-lang/rust/issues/93706 is merged.

Review Comment:
   Oh, I see.



-- 
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.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-rs] viirya commented on a diff in pull request #1664: Replace `fn is_large` with `const IS_LARGE`

Posted by GitBox <gi...@apache.org>.
viirya commented on code in PR #1664:
URL: https://github.com/apache/arrow-rs/pull/1664#discussion_r867021100


##########
arrow/src/array/array_binary.rs:
##########
@@ -44,8 +44,11 @@ pub struct GenericBinaryArray<OffsetSize: OffsetSizeTrait> {
 }
 
 impl<OffsetSize: OffsetSizeTrait> GenericBinaryArray<OffsetSize> {
+    /// Get the data type of the array.
+    // Declare this function as `pub const fn` after
+    // https://github.com/rust-lang/rust/issues/93706 is merged.

Review Comment:
   Make consistent comment style?
   ```suggestion
       // Get the data type of the array.
       // Declare this function as `pub const fn` after
       // https://github.com/rust-lang/rust/issues/93706 is merged.
   ```



-- 
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.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-rs] HaoYang670 commented on a diff in pull request #1664: Replace `fn is_large` with `const IS_LARGE`

Posted by GitBox <gi...@apache.org>.
HaoYang670 commented on code in PR #1664:
URL: https://github.com/apache/arrow-rs/pull/1664#discussion_r867279175


##########
arrow/src/array/array_binary.rs:
##########
@@ -44,8 +44,11 @@ pub struct GenericBinaryArray<OffsetSize: OffsetSizeTrait> {
 }
 
 impl<OffsetSize: OffsetSizeTrait> GenericBinaryArray<OffsetSize> {
+    /// Get the data type of the array.
+    // Declare this function as `pub const fn` after
+    // https://github.com/rust-lang/rust/issues/93706 is merged.

Review Comment:
   I just want to make the first line (`Get the data type of the array.`) be the doc of this function. And it is not necessary to expose the 2nd and 3rd line to users, so I use `//`.



-- 
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.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-rs] viirya commented on a diff in pull request #1664: Replace `fn is_large` with `const IS_LARGE`

Posted by GitBox <gi...@apache.org>.
viirya commented on code in PR #1664:
URL: https://github.com/apache/arrow-rs/pull/1664#discussion_r867286279


##########
arrow/src/array/array_binary.rs:
##########
@@ -44,8 +44,11 @@ pub struct GenericBinaryArray<OffsetSize: OffsetSizeTrait> {
 }
 
 impl<OffsetSize: OffsetSizeTrait> GenericBinaryArray<OffsetSize> {
+    /// Get the data type of the array.
+    // Declare this function as `pub const fn` after
+    // https://github.com/rust-lang/rust/issues/93706 is merged.

Review Comment:
   Make sense.



-- 
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.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-rs] HaoYang670 commented on pull request #1664: Replace `fn is_large` with `const IS_LARGE`

Posted by GitBox <gi...@apache.org>.
HaoYang670 commented on PR #1664:
URL: https://github.com/apache/arrow-rs/pull/1664#issuecomment-1120503032

   Thank you for your review. @viirya !!


-- 
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.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-rs] viirya commented on pull request #1664: Replace `fn is_large` with `const IS_LARGE`

Posted by GitBox <gi...@apache.org>.
viirya commented on PR #1664:
URL: https://github.com/apache/arrow-rs/pull/1664#issuecomment-1120502680

   Merged. Thanks @HaoYang670 


-- 
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.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-rs] HaoYang670 commented on pull request #1664: Replace `fn is_large` with `const IS_LARGE`

Posted by GitBox <gi...@apache.org>.
HaoYang670 commented on PR #1664:
URL: https://github.com/apache/arrow-rs/pull/1664#issuecomment-1120501818

   Could we merge this PR, as the potential merge conflict is high?


-- 
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.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-rs] viirya merged pull request #1664: Replace `fn is_large` with `const IS_LARGE`

Posted by GitBox <gi...@apache.org>.
viirya merged PR #1664:
URL: https://github.com/apache/arrow-rs/pull/1664


-- 
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.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

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