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/04/13 18:52:47 UTC

[GitHub] [arrow-rs] sunchao opened a new pull request, #1564: Support FixedSizeBinary and FixedSizeList for the C data interface

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

   # 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 #1553.
   
   # Rationale for this change
    
    <!---
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
   -->
   
   Currently the C data interface doesn't support `FixedSizeBinary` and `FixedSizeList` yet with the following error message:
   
   ```
   CDataInterface("The datatype \"FixedSizeBinary(9)\" is still not supported in Rust implementation
   ```
   
   # What changes are included in this PR?
   
   <!---
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   This PR adds support for `FixedSizeBinary` and `FixedSizeList` in the Rust C data interface.
   
   # Are there any user-facing changes?
   
   <!---
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   Yes now `FixedSizeBinary` and `FixedSizeList` are supported. No API breakage.
   
   <!---
   If there are any breaking changes to public APIs, please add the `breaking change` label.
   -->


-- 
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 #1564: Support FixedSizeBinary and FixedSizeList for the C data interface

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


##########
arrow-pyarrow-integration-testing/tests/test_sql.py:
##########
@@ -190,6 +190,29 @@ def test_time32_python():
     del b
     del expected
 
+def test_binary_array():
+    """
+    Python -> Rust -> Python
+    """
+    a = pa.array(["a", None, "bb", "ccc"], pa.binary())

Review Comment:
   So just add for test coverage?



-- 
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] sunchao commented on a diff in pull request #1564: Support FixedSizeBinary and FixedSizeList for the C data interface

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


##########
arrow-pyarrow-integration-testing/tests/test_sql.py:
##########
@@ -190,6 +190,29 @@ def test_time32_python():
     del b
     del expected
 
+def test_binary_array():
+    """
+    Python -> Rust -> Python
+    """
+    a = pa.array(["a", None, "bb", "ccc"], pa.binary())

Review Comment:
   Yea. I found there is no test coverage for `binary` type yet so just added it.



-- 
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] sunchao commented on a diff in pull request #1564: Support FixedSizeBinary and FixedSizeList for the C data interface

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


##########
arrow-pyarrow-integration-testing/tests/test_sql.py:
##########
@@ -190,6 +190,29 @@ def test_time32_python():
     del b
     del expected
 
+def test_binary_array():
+    """
+    Python -> Rust -> Python
+    """
+    a = pa.array(["a", None, "bb", "ccc"], pa.binary())

Review Comment:
   This is just binary since `pa.binary()` doesn't have length specified (different from `pa.binary(3)` for instance).



-- 
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] alamb merged pull request #1564: Support FixedSizeBinary and FixedSizeList for the C data interface

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


-- 
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 #1564: Support FixedSizeBinary and FixedSizeList for the C data interface

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


##########
arrow-pyarrow-integration-testing/tests/test_sql.py:
##########
@@ -190,6 +190,29 @@ def test_time32_python():
     del b
     del expected
 
+def test_binary_array():
+    """
+    Python -> Rust -> Python
+    """
+    a = pa.array(["a", None, "bb", "ccc"], pa.binary())

Review Comment:
   is this also `FixedSizeBinary`?



-- 
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] sunchao commented on pull request #1564: Support FixedSizeBinary and FixedSizeList for the C data interface

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

   cc @alamb @jorgecarleitao too


-- 
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] alamb commented on pull request #1564: Support FixedSizeBinary and FixedSizeList for the C data interface

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

   Thanks @sunchao  and @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