boolean isAggregate = declAggrNames.length > 0;
if (isAggregate) {
privNode.setNames(REP_AGGREGATES, declAggrNames);
}
PrivilegeBits bits;
if (PrivilegeBits.BUILT_IN.containsKey(name)) {
bits = PrivilegeBits.BUILT_IN.get(name);
} else if (isAggregate) {
bits = bitsMgr.getBits(declAggrNames);
} else {
bits = next();
}
bits.writeTo(privNode.getTree());
}