[ 
https://issues.apache.org/jira/browse/ARROW-1598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16176548#comment-16176548
 ] 

ASF GitHub Bot commented on ARROW-1598:
---------------------------------------

GitHub user kenhys opened a pull request:

    https://github.com/apache/arrow/pull/1124

    ARROW-1598: [C++] Fix diverged code comment in plasma tutorial

    Even though fixed object id is used in implementation, comment says random 
object id is created.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kenhys/arrow arrow-1598

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/arrow/pull/1124.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1124
    
----
commit dc5934ec4c95fd457d3631975b73b99a37288a51
Author: Kentaro Hayashi <[email protected]>
Date:   2017-09-22T14:57:36Z

    ARROW-1598: [C++] Fix diverged code comment in plasma tutorial

----


> [C++/Tutorials] MIsmatch code comment and actual code about Object ID
> ---------------------------------------------------------------------
>
>                 Key: ARROW-1598
>                 URL: https://issues.apache.org/jira/browse/ARROW-1598
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Plasma (C++)
>            Reporter: Kentaro Hayashi
>            Priority: Minor
>              Labels: pull-request-available
>
> In Plasma documentation, there is a mismatch between code comment and actual 
> code.
> Here is the sample code in "Creating an Object" section:
> {code:c++}
> #include <plasma/client.h>
> using namespace plasma;
> int main(int argc, char** argv) {
>   // Start up and connect a Plasma client.
>   PlasmaClient client;
>   ARROW_CHECK_OK(client.Connect("/tmp/plasma", "", 
> PLASMA_DEFAULT_RELEASE_DELAY));
>   // Create an object with a random ObjectID.
>   ObjectID object_id = ObjectID::from_binary("00000000000000000000");
>   int64_t data_size = 1000;
>   uint8_t *data;
>   std::string metadata = "{'author': 'john'}";
>   ARROW_CHECK_OK(client.Create(object_id, data_size, (uint8_t*) 
> metadata.data(), metadata.size(), &data));
>   // Write some data into the object.
>   for (int64_t i = 0; i < data_size; i++) {
>     data[i] = static_cast<uint8_t>(i % 4);
>   }
>   // Seal the object.
>   ARROW_CHECK_OK(client.Seal(object_id));
>   // Disconnect the client.
>   ARROW_CHECK_OK(client.Disconnect());
> }
> {code}
> https://github.com/apache/arrow/blame/master/cpp/apidoc/tutorials/plasma.md#L223
> It seems that code comment " // Create an object with a random ObjectID." 
> description and "ObjectID object_id = 
> ObjectID::from_binary("00000000000000000000");" is diverged.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to