[jira] [Commented] (LUCENE-8152) Simplify conditionals in JoinUtil

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (LUCENE-8152) Simplify conditionals in JoinUtil

JIRA jira@apache.org

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

ASF subversion and git services commented on LUCENE-8152:
---------------------------------------------------------

Commit 83befcbce2d4eb19f0f65af1e8d2fcc86e7302e0 in lucene-solr's branch refs/heads/branch_7x from [~jpountz]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=83befcb ]

LUCENE-8152: Consistently use advanceExact over advance.


> Simplify conditionals in JoinUtil
> ----------------------------------
>
>                 Key: LUCENE-8152
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8152
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Horatiu Lazu
>            Priority: Trivial
>         Attachments: LUCENE-8152.patch, LUCENE-8152.patch
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The following could be simplified, on line 249:
> {code:java}
> int dvDocID = numericDocValues.docID();
> if (dvDocID < doc) {
>   dvDocID = numericDocValues.advance(doc);
> }
> long value;
> if (dvDocID == doc) {
>   value = numericDocValues.longValue();
> } else {
>   value = 0;
> }
> {code}
> To:
> {code:java}
> long value = 0;
> if (numericDocValues.advanceExact(doc)) {
>   value = numericDocValues.longValue();
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]