You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "JC (JIRA)" <ji...@apache.org> on 2017/08/14 14:04:00 UTC
[jira] [Created] (PHOENIX-4083) May cause a wrong sting value
JC created PHOENIX-4083:
---------------------------
Summary: May cause a wrong sting value
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)