You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "bkietz (via GitHub)" <gi...@apache.org> on 2023/08/16 13:42:37 UTC

[GitHub] [arrow] bkietz commented on a diff in pull request #37174: GH-37173: [C++][Format] C-export/import Run-End Encoded Arrays

bkietz commented on code in PR #37174:
URL: https://github.com/apache/arrow/pull/37174#discussion_r1295916233


##########
docs/source/format/CDataInterface.rst:
##########
@@ -217,6 +217,8 @@ names and types of child fields are read from the child arrays.
 +------------------------+---------------------------------------------------+------------+
 | ``+us:I,J,...``        | sparse union with type ids I,J...                 |            |
 +------------------------+---------------------------------------------------+------------+
+| ``+r``                 | run-end encoded                                   |            |

Review Comment:
   I think reiteration is warranted in this case, something like:
   ```suggestion
   | ``+r``                 | run-end encoded                                   | \(3)       |
   ```
   ```rst
   (3)
      As specified in the Arrow columnar format, the run end encoded type two children where the first is the (integral) run ends and the second is the values.
   ```



##########
cpp/src/arrow/c/bridge_test.cc:
##########
@@ -443,6 +444,13 @@ TEST_F(TestSchemaExport, Union) {
              {ARROW_FLAG_NULLABLE});
 }
 
+TEST_F(TestSchemaExport, RunEndEncoded) {
+  TestNested(run_end_encoded(int16(), uint8()), {"+r", "s", "C"},
+             {"", "run_ends", "values"}, {ARROW_FLAG_NULLABLE, 0, ARROW_FLAG_NULLABLE});
+  TestNested(run_end_encoded(int64(), int32()), {"+r", "l", "i"},

Review Comment:
   Just to prove it's not a problem, I'd like to see a test or two where the values are non-primitive (IE nested and/or dictionary encoded)



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