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

Ankit Singhal edited comment on PHOENIX-4083 at 8/16/17 10:14 AM:
------------------------------------------------------------------

yes.. my bad. Thanks [~lifove] for pointing out. Just committed the fix in 
master and 4.x branches.


was (Author: an...@apache.org):
yes.. my bad. Thanks [~lifove] for pointing out. Just the committed the fix in 
master and 4.x branches.

> Incorrect conditional when including OFFSET into explain plan
> -------------------------------------------------------------
>
>                 Key: PHOENIX-4083
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4083
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: JC
>            Priority: Trivial
>
> Hi
> I've found a suspicious code in a recent github repo.
> Path: 
> phoenix-core/src/main/java/org/apache/phoenix/iterate/OrderedResultIterator.java
> {code:java}
> 292     public void explain(List<String> planSteps) {
> 293         delegate.explain(planSteps);
> 294         planSteps.add("CLIENT" + (offset != null ? "" : " OFFSET " + 
> offset)
> 295                 + (limit == null ? "" : " TOP " + limit + " ROW" + (limit 
> == 1 ? "" : "S")) + " SORTED BY "
> 296                 + orderByExpressions.toString());
> 297     }
> {code}
> In Line 294, the condition, `offset != null', should be `offset == null'? 
> Otherwise, the string value willl be `CLIENT OFFSET null' only when the 
> offset is null. (c.f. limit returns an empty string when it is null.) Since I 
> don't have domain knowledge of this project, I have no idea if this is 
> intended. But I wanted to report this just in case.
> Thanks!



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

Reply via email to