[ 
https://issues.apache.org/jira/browse/PHOENIX-598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gabriel Reid resolved PHOENIX-598.
----------------------------------

    Resolution: Fixed

Bulk resolve of closed issues imported from GitHub. This status was reached by 
first re-opening all closed imported issues and then resolving them in bulk.

> wrong data returned by query that uses /*+ RANGE_SCAN */
> --------------------------------------------------------
>
>                 Key: PHOENIX-598
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-598
>             Project: Phoenix
>          Issue Type: Task
>    Affects Versions: 2.1.0-Release
>            Reporter: Seth White
>            Assignee: James Taylor
>
> My query is working correctly, but when I add a range scan hint, I'm seeing 
> the wrong data coming back. For example, this query
> select /*+ RANGE_SCAN */ ORGANIZATION_ID, PARENT_ID, CREATED_DATE, 
> ENTITY_HISTORY_ID from SFDC.FIELD_HISTORY_ARCHIVE where ORGANIZATION_ID=? and 
> SUBSTR(PARENT_ID, 1, 3) = ? and ? <= CREATED_DATE and CREATED_DATE <= ? order 
> by ORGANIZATION_ID, PARENT_ID, CREATED_DATE DESC, ENTITY_HISTORY_ID limit 6
> with these date parameters
> start date-2012-12-01 08:40:09
> end date-2012-12-02 08:40:09
> produces rows with dates outside the date range
> orgId-000000000000000 parentId-000000000000000 created date-2012-12-29 
> 10:58:12 entity history id-000000000007190
> orgId-000000000000000 parentId-000000000000000 created date-2012-12-29 
> 10:58:12 entity history id-000000000007191
> orgId-000000000000000 parentId-000000000000000 created date-2012-12-29 
> 10:58:12 entity history id-000000000007192
> orgId-000000000000000 parentId-000000000000000 created date-2012-12-29 
> 10:58:12 entity history id-000000000007193
> orgId-000000000000000 parentId-000000000000000 created date-2012-12-29 
> 10:58:12 entity history id-000000000007194
> Here's the output (first five rows) for the query without the hint:
> select ORGANIZATION_ID, PARENT_ID, CREATED_DATE, ENTITY_HISTORY_ID from 
> SFDC.FIELD_HISTORY_ARCHIVE where ORGANIZATION_ID=? and SUBSTR(PARENT_ID, 1, 
> 3) = ? and ? <= CREATED_DATE and CREATED_DATE <= ? order by ORGANIZATION_ID, 
> PARENT_ID, CREATED_DATE DESC, ENTITY_HISTORY_ID limit 6
> start date-2012-12-01 08:49:23
> end date-2012-12-02 08:49:23
> SkipScanTest---orgId-000000000000000 parentId-000000000000000 created 
> date-2012-12-01 10:58:12 entity history id-000000000006910
> SkipScanTest---orgId-000000000000000 parentId-000000000000000 created 
> date-2012-12-01 10:58:12 entity history id-000000000006911
> SkipScanTest---orgId-000000000000000 parentId-000000000000000 created 
> date-2012-12-01 10:58:12 entity history id-000000000006912
> SkipScanTest---orgId-000000000000000 parentId-000000000000000 created 
> date-2012-12-01 10:58:12 entity history id-000000000006913
> SkipScanTest---orgId-000000000000000 parentId-000000000000000 created 
> date-2012-12-01 10:58:12 entity history id-000000000006914



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to