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

James Taylor commented on PHOENIX-4333:
---------------------------------------

Also, looking at ExplainPlanWithStatsEnabledIT.testSelectQueriesWithFilters(), 
the region boundaries are not going to intersect as expected with the 
guideposts, since the split points are using raw bytes which won't have the 
sign bit flipped. Below is what you want to do as Phoenix will do the right 
thing in that case wrt to data types. Some other tests need to be changed as 
well - I'd recommend just always having the SPLIT clause in the CREATE TABLE 
statement as it's just more clear.
{code}
    private void testSelectQueriesWithFilters(boolean 
useStatsForParallelization) throws Exception {
        String tableName = generateUniqueName();
        try (Connection conn = DriverManager.getConnection(getUrl())) {
            int guidePostWidth = 20;
            String ddl =
                    "CREATE TABLE " + tableName + " (k INTEGER PRIMARY KEY, a 
bigint, b bigint) "
                            + " GUIDE_POSTS_WIDTH=" + guidePostWidth
                            + ", USE_STATS_FOR_PARALLELIZATION=" + 
useStatsForParallelization + " SPLIT ON (102,105,108)";
            conn.createStatement().execute(ddl);
            conn.createStatement().execute("upsert into " + tableName + " 
values (100,100,3)");
{code}

> Stats - Incorrect estimate when stats are updated on a tenant specific view
> ---------------------------------------------------------------------------
>
>                 Key: PHOENIX-4333
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4333
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.12.0
>            Reporter: Mujtaba Chohan
>            Assignee: Samarth Jain
>            Priority: Major
>         Attachments: PHOENIX-4333_test.patch, PHOENIX-4333_v1.patch, 
> PHOENIX-4333_v2.patch
>
>
> Consider two tenants A, B with tenant specific view on 2 separate 
> regions/region servers.
> {noformat}
> Region 1 keys:
> A,1
> A,2
> B,1
> Region 2 keys:
> B,2
> B,3
> {noformat}
> When stats are updated on tenant A view. Querying stats on tenant B view 
> yield partial results (only contains stats for B,1) which are incorrect even 
> though it shows updated timestamp as current.



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

Reply via email to