You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "tang-hi (via GitHub)" <gi...@apache.org> on 2023/05/03 14:23:51 UTC

[GitHub] [lucene] tang-hi commented on issue #12225: BulkOperationPacked decode() bug

tang-hi commented on issue #12225:
URL: https://github.com/apache/lucene/issues/12225#issuecomment-1533120380

   @Stupiddd, I believe it's not a bug. In the comment for the decode method, it states:
   ```
   Read `iterations * blockCount()` blocks from `blocks`, decode them, and write `iterations * valueCount()` values into `values`.
   ```
   The loop iteration count can be determined by either `iterations * blockCount()` or `iterations * valueCount()`. When decoding from long[] blocks, using `iterations * valueCount()` is more straightforward. On the other hand, when decoding from byte[] blocks, using `iterations * blockCount()` is more convenient. Therefore, using `iterations * byteValueCount` as the iteration count should be fine. Please correct me if I'm wrong :smile: .
   
   Additionally, I believe the confusion arises due to the lack of comments. You may consider adding more comments to this class to provide better clarity for others who might encounter the same issue.


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org