TEIID-3263 fixing aggregate processing
TEIID-3259 adding backwards compatibility