orc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Citrullin <...@git.apache.org>
Subject [GitHub] orc pull request #104: Core documentation fixes
Date Thu, 13 Apr 2017 20:37:50 GMT
Github user Citrullin commented on a diff in the pull request:

    https://github.com/apache/orc/pull/104#discussion_r111481491
  
    --- Diff: site/_docs/core-java.md ---
    @@ -233,14 +233,15 @@ VectorizedRowBatch batch = schema.createRowBatch();
     LongColumnVector x = (LongColumnVector) batch.cols[0];
     LongColumnVector y = (LongColumnVector) batch.cols[1];
     for(int r=0; r < 10000; ++r) {
    -  int row = batch.size++;
    +  int row = batch.size;
       x.vector[row] = r;
       y.vector[row] = r * 3;
       // If the batch is full, write it out and start over.
       if (batch.size == batch.getMaxSize()) {
         writer.addRowBatch(batch);
         batch.reset();
       }
    +  batch.size++;
     }
     writer.close();
    --- End diff --
    
    That's correct. I already fixed it in my code. Had also this issue when the batch smaller
than the max size.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message