phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-3921) ScanUtil#unsetReversed doesn't seem to unset reversal of Scan
Date Thu, 08 Jun 2017 13:06:18 GMT

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

ASF GitHub Bot commented on PHOENIX-3921:
-----------------------------------------

GitHub user bijugs opened a pull request:

    https://github.com/apache/phoenix/pull/258

    PHOENIX-3921 Change the condition checking in ScanUtil#isReversed

    The current logic will return ``isReversed`` as ``true`` whether the ``BaseScannerRegionObserver.REVERSE_SCAN``
attribute is set to ``PDataType.TRUE_BYTES`` or ``PDataType.FALSE_BYTES``. The PR is to change
it to return ``true`` only if  ``BaseScannerRegionObserver.REVERSE_SCAN`` attribute is set
to ``PDataType.TRUE_BYTES``.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/bijugs/phoenix PHOENIX-3921

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/phoenix/pull/258.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #258
    
----
commit b2e845467802b20cf013976e8bdead7f7769cae6
Author: Biju Nair <gs.biju@gmail.com>
Date:   2017-06-08T13:00:20Z

    PHOENIX-3921 Change the condition checking in ScanUtil#isReversed

----


> ScanUtil#unsetReversed doesn't seem to unset reversal of Scan
> -------------------------------------------------------------
>
>                 Key: PHOENIX-3921
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3921
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Biju Nair
>
> Created a new iterator with a {{scan}} object set to be non reversed using {{ScanUtil.unsetReversed(scan)}}.
But the iteration moves in the reverse order. {{BaseResultIterators.java}} has the condition
check
> {code}
> boolean isReverse = ScanUtil.isReversed(scan);
> {code}
> Looking at [ScanUtil.java|https://github.com/apache/phoenix/blob/2cb617f352048179439d242d1165a9ffb39ad81c/phoenix-core/src/main/java/org/apache/phoenix/util/ScanUtil.java#L609]
{{isReversed}} method is defined as
> {code}
> return scan.getAttribute(BaseScannerRegionObserver.REVERSE_SCAN) != null;
> {code}
> do we need to change the condition check to compare to {{PDataType.TRUE_BYTES}}
> The current logic will return {{isReversed}} as {{true}} whether the {{BaseScannerRegionObserver.REVERSE_SCAN}}
attribute is set to {{PDataType.TRUE_BYTES}} or {{PDataType.FALSE_BYTES}} which corresponds
to values set in {{setReversed}} and {{unsetReversed}} methods.
>  



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message