Aggregate.java org::apache::iceberg::expressions::Aggregate org::apache::iceberg::expressions /* *LicensedtotheApacheSoftwareFoundation(ASF)underone *ormorecontributorlicenseagreements.SeetheNOTICEfile *distributedwiththisworkforadditionalinformation *regardingcopyrightownership.TheASFlicensesthisfile *toyouundertheApacheLicense,Version2.0(the *"License");youmaynotusethisfileexceptincompliance *withtheLicense.YoumayobtainacopyoftheLicenseat * *http://www.apache.org/licenses/LICENSE-2.0 * *Unlessrequiredbyapplicablelaworagreedtoinwriting, *softwaredistributedundertheLicenseisdistributedonan *"ASIS"BASIS,WITHOUTWARRANTIESORCONDITIONSOFANY *KIND,eitherexpressorimplied.SeetheLicenseforthe *specificlanguagegoverningpermissionsandlimitations *undertheLicense. */ packageorg.apache.iceberg.expressions; publicabstractclassAggregate<CextendsTerm>implementsExpression{ privatefinalOperationop; privatefinalCterm; Aggregate(Operationop,Cterm){ this.op=op; this.term=term; } @Override publicOperationop(){ returnop; } publicCterm(){ returnterm; } @Override publicStringtoString(){ switch(op()){ caseCOUNT: return"count("+term()+")"; caseCOUNT_STAR: return"count(*)"; caseMAX: return"max("+term()+")"; caseMIN: return"min("+term()+")"; default: thrownewUnsupportedOperationException("Invalidaggregate:"+op()); } } }