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 2021/02/21 14:53:28 UTC

[GitHub] [arrow] ritchie46 opened a new pull request #9540: ARROW-11722: [Rust] Imporve error message in FFI cast.

ritchie46 opened a new pull request #9540:
URL: https://github.com/apache/arrow/pull/9540


   While trying to cast from pyarrow to rust I encountered the following error message: `CDataInterface("The datatype \"{}\" is still not supported in Rust implementation")`, which is not very informative. 
   
   This PR is very small and prints the datatype format passed to the function in the error message.


----------------------------------------------------------------
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] alamb closed pull request #9540: ARROW-11722: [Rust] Improve error message in FFI cast.

Posted by GitBox <gi...@apache.org>.
alamb closed pull request #9540:
URL: https://github.com/apache/arrow/pull/9540


   


----------------------------------------------------------------
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 #9540: ARROW-11722: [Rust] Improve error message in FFI cast.

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


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


----------------------------------------------------------------
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] codecov-io commented on pull request #9540: ARROW-11722: [Rust] Improve error message in FFI cast.

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #9540:
URL: https://github.com/apache/arrow/pull/9540#issuecomment-782872798


   # [Codecov](https://codecov.io/gh/apache/arrow/pull/9540?src=pr&el=h1) Report
   > Merging [#9540](https://codecov.io/gh/apache/arrow/pull/9540?src=pr&el=desc) (ce732c6) into [master](https://codecov.io/gh/apache/arrow/commit/924449eba36acda22ccb319e8de8921c090a4cd2?el=desc) (924449e) will **not change** coverage.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/arrow/pull/9540/graphs/tree.svg?width=650&height=150&src=pr&token=LpTCFbqVT1)](https://codecov.io/gh/apache/arrow/pull/9540?src=pr&el=tree)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master    #9540   +/-   ##
   =======================================
     Coverage   82.29%   82.29%           
   =======================================
     Files         244      244           
     Lines       55616    55616           
   =======================================
     Hits        45767    45767           
     Misses       9849     9849           
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/arrow/pull/9540?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [rust/arrow/src/ffi.rs](https://codecov.io/gh/apache/arrow/pull/9540/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvZmZpLnJz) | `76.22% <0.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow/pull/9540?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/arrow/pull/9540?src=pr&el=footer). Last update [924449e...ce732c6](https://codecov.io/gh/apache/arrow/pull/9540?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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] codecov-io edited a comment on pull request #9540: ARROW-11722: [Rust] Improve error message in FFI cast.

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #9540:
URL: https://github.com/apache/arrow/pull/9540#issuecomment-782872798


   # [Codecov](https://codecov.io/gh/apache/arrow/pull/9540?src=pr&el=h1) Report
   > Merging [#9540](https://codecov.io/gh/apache/arrow/pull/9540?src=pr&el=desc) (f53ae25) into [master](https://codecov.io/gh/apache/arrow/commit/924449eba36acda22ccb319e8de8921c090a4cd2?el=desc) (924449e) will **decrease** coverage by `0.00%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/arrow/pull/9540/graphs/tree.svg?width=650&height=150&src=pr&token=LpTCFbqVT1)](https://codecov.io/gh/apache/arrow/pull/9540?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #9540      +/-   ##
   ==========================================
   - Coverage   82.29%   82.28%   -0.01%     
   ==========================================
     Files         244      244              
     Lines       55616    55616              
   ==========================================
   - Hits        45767    45766       -1     
   - Misses       9849     9850       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/arrow/pull/9540?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [rust/arrow/src/ffi.rs](https://codecov.io/gh/apache/arrow/pull/9540/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvZmZpLnJz) | `76.22% <0.00%> (ø)` | |
   | [rust/parquet/src/encodings/encoding.rs](https://codecov.io/gh/apache/arrow/pull/9540/diff?src=pr&el=tree#diff-cnVzdC9wYXJxdWV0L3NyYy9lbmNvZGluZ3MvZW5jb2RpbmcucnM=) | `94.86% <0.00%> (-0.20%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow/pull/9540?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/arrow/pull/9540?src=pr&el=footer). Last update [924449e...f53ae25](https://codecov.io/gh/apache/arrow/pull/9540?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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] Dandandan commented on a change in pull request #9540: ARROW-11722: [Rust] Improve error message in FFI cast.

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



##########
File path: rust/arrow/src/ffi.rs
##########
@@ -193,11 +193,11 @@ fn to_datatype(format: &str) -> Result<DataType> {
         "ttm" => DataType::Time32(TimeUnit::Millisecond),
         "ttu" => DataType::Time64(TimeUnit::Microsecond),
         "ttn" => DataType::Time64(TimeUnit::Nanosecond),
-        _ => {
-            return Err(ArrowError::CDataInterface(
-                "The datatype \"{}\" is still not supported in Rust implementation"
-                    .to_string(),
-            ))
+        dt => {
+            return Err(ArrowError::CDataInterface(format!(
+                "The datatype \"{}\" is still not supported in Rust implementation",

Review comment:
       ```suggestion
                   "The datatype \"{}\" is not supported in the Rust implementation",
   ```




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