private static View copyChildView(GroupByView groupView, String[] propertyNames, Object groupByValues, AgentInstanceViewFactoryChainContext agentInstanceContext, View originalChildView) {
if (originalChildView instanceof MergeView)
{
String message = "Unexpected merge view as child of group-by view";
log.fatal(".copySubViews " + message);
throw new EPException(message);
}
if (!(originalChildView instanceof CloneableView))
{
throw new EPException("Unexpected error copying subview " + originalChildView.getClass().getName());
}
CloneableView cloneableView = (CloneableView) originalChildView;
// Copy child node
View copyChildView = cloneableView.cloneView();