gjacoby126 commented on a change in pull request #740: PHOENIX-5795 Supporting
selective queries for index rows updated conc…
URL: https://github.com/apache/phoenix/pull/740#discussion_r396878530
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/hbase/index/IndexRegionObserver.java
##########
@@ -803,7 +766,31 @@ protected PhoenixIndexMetaData
getPhoenixIndexMetaData(ObserverContext<RegionCop
return (PhoenixIndexMetaData)indexMetaData;
}
- private void preparePostIndexMutations(BatchMutateContext context, long
now, PhoenixIndexMetaData indexMetaData)
+ private boolean hasAllIndexedColumns(IndexMaintainer indexMaintainer,
MultiMutation multiMutation) {
+ Map<byte[], List<Cell>> familyMap = multiMutation.getFamilyCellMap();
+ for (ColumnReference columnReference :
indexMaintainer.getIndexedColumns()) {
+ byte[] family = columnReference.getFamily();
+ List<Cell> cellList = familyMap.get(family);
+ if (cellList == null) {
+ return false;
+ }
+ boolean has = false;
+ for (Cell cell : cellList) {
+ if (Bytes.compareTo(CellUtil.cloneFamily(cell), family) == 0 &&
Review comment:
Can be replaced with CellUtil.matchingColumn(Cell, family, qualifier)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services