[ https://issues.apache.org/jira/browse/PHOENIX-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14273981#comment-14273981 ]
James Taylor commented on PHOENIX-1453: --------------------------------------- Thanks for the patch, [~ramkrishna]. I think the logic for leftRowCount and rightRowCount is reversed. The left side is the one that should use the (per * rowCount) value and the right side should use ((1 - per) * rowCount). {code} + if (rowCountCell != null) { + rowCount = PLong.INSTANCE.getCodec().decodeLong(rowCountCell.getValueArray(), + rowCountCell.getValueOffset(), SortOrder.getDefault()); + rightRowCount = (long)(per * rowCount); + leftRowCount = (long) ((1 - per) * rowCount); + } + if (byteSizeCell != null) { + byteSize = PLong.INSTANCE.getCodec().decodeLong(byteSizeCell.getValueArray(), + byteSizeCell.getValueOffset(), SortOrder.getDefault()); + rightByteCount = (long)(per * byteSize); + leftByteCount = (long)((1 - per) * byteSize); + } if (midEndIndex > 0) { - GuidePostsInfo lguidePosts = new GuidePostsInfo(byteSize, guidePosts.getGuidePosts().subList(0, midEndIndex)); - tracker.clear(); + GuidePostsInfo lguidePosts = new GuidePostsInfo(leftByteCount, guidePostsRegionInfo + .getGuidePosts().subList(0, midEndIndex), leftRowCount); + tracker.clear(); {code} Looks great other than that. > Collect row counts per region in stats table > -------------------------------------------- > > Key: PHOENIX-1453 > URL: https://issues.apache.org/jira/browse/PHOENIX-1453 > Project: Phoenix > Issue Type: Sub-task > Reporter: James Taylor > Assignee: ramkrishna.s.vasudevan > Attachments: Phoenix-1453.patch, Phoenix-1453_1.patch, > Phoenix-1453_10.patch, Phoenix-1453_13.patch, Phoenix-1453_15.patch, > Phoenix-1453_17.patch, Phoenix-1453_18.patch, Phoenix-1453_2.patch, > Phoenix-1453_3.patch, Phoenix-1453_7.patch, Phoenix-1453_8.patch > > > We currently collect guideposts per equal chunk, but we should also capture > row counts. Should we have a parallel array with the guideposts that count > rows per guidepost, or is it enough to have a per region count? -- This message was sent by Atlassian JIRA (v6.3.4#6332)