gokceni 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_r396686182
##########
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 &&
+ Bytes.compareTo(CellUtil.cloneQualifier(cell),
columnReference.getQualifier() ) == 0) {
+ has = true;
Review comment:
Suggestion: Change cell names and family to indicate whether they belong to
index or data table.
I am not sure I understand this loop. If we have index and and data cell
having same family and qualifier we just break? Should not it be if they are
not equal break?
----------------------------------------------------------------
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