phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ankit Singhal (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-4083) Incorrect conditional when including OFFSET into explain plan
Date Wed, 16 Aug 2017 10:14:01 GMT

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

Ankit Singhal commented on PHOENIX-4083:
----------------------------------------

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)

Mime
View raw message