package Ġch . un ib as . d mi . db is . cott ont ail . execution . tasks . entity . boolean Ċ Ċ import Ġch . un ib as . d mi . db is . cott ont ail . database . entity . Entity Ċ import Ġch . un ib as . d mi . db is . cott ont ail . database . general . query Ċ import Ġch . un ib as . d mi . db is . cott ont ail . database . index . Index Ċ import Ġch . un ib as . d mi . db is . cott ont ail . database . queries . Boolean Predicate Ċ import Ġch . un ib as . d mi . db is . cott ont ail . execution . tasks . basics . Execution Task Ċ import Ġch . un ib as . d mi . db is . cott ont ail . model . record set . Record set Ċ Ċ import Ġcom . github . dex ec utor . core . task . Task Ċ Ċ /** Ċ Ġ* ĠA Ġ[ Task ] Ġthat Ġexecutes Ġa Ġfull Ġtable Ġboolean Ġon Ġa Ġdefined Ġ[ Entity ] Ġusing Ġa Ġ[ Boolean Predicate ]. ĠOnly Ġreturns Ġ[ Record ] s Ġthat Ġmatch Ġthe Ġprovided Ġ[ Boolean Predicate ]. Ċ Ġ* Ċ Ġ* Ġ@ author ĠR alph ĠG asser Ċ Ġ* Ġ@ version Ġ 1 . 0 Ċ Ġ*/ Ċ internal Ġclass ĠEntity Linear Scan Filter Task ( private Ġval Ġentity : ĠEntity , Ġprivate Ġval Ġpredicate : ĠBoolean Predicate ) Ġ: ĠExecution Task (" Entity Linear Scan Filter Task [ ${ entity . fq n } ][$ predicate ]") Ġ{ ĊĊĠĠĠ Ġ/** ĠThe Ġcost Ġof Ġthis Ġ[ Entity Linear Scan Filter Task ] Ġdepends Ġon Ġwhether Ġor Ġnot Ġan Ġ[ Index ] Ġcan Ġbe Ġemploy ed . Ġ*/ ĊĠĠĠ Ġoverride Ġval Ġcost Ġ= Ġ( this . entity . statistics . columns Ġ* Ġthis . predicate . operations ). toFloat () ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠExec utes Ġthis Ġ[ Entity Linear Scan Filter Task ] ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġoverride Ġfun Ġexecute (): ĠRecord set Ġ= Ġthis . entity . Tx ( readonly Ġ= Ġtrue , Ġcolumns Ġ= Ġthis . predicate . columns . to Typed Array ()). query Ġ{ ĊĠĠĠĠĠĠĠ Ġit . filter ( this . predicate ) ĊĠĠĠ Ġ} Ġ?: ĠRecord set ( this . predicate . columns . to Typed Array ()) Ċ }