@Override
public HKey ancestorHKey(Table table)
{
// TODO: This does the wrong thing for hkeys derived from group index rows!
// TODO: See bug 997746.
HKeyRowType rowType = this.rowType().schema().newHKeyRowType(table.hKey());
HKey ancestorHKey = new ValuesHKey(rowType, this.registry);
copyTo(ancestorHKey);
ancestorHKey.useSegments(table.getDepth() + 1);
return ancestorHKey;
}