@@ -354,10 +354,10 @@ class SelectionTile {
354354 addSort ( key : string , getter : ( row : StructRowProxy ) => number ) {
355355 const { bitmask } = this ;
356356 const indices = Bitmask . from_arrow ( bitmask ) . which ( ) ;
357- const pairs : [ number , number ] [ ] = new Array ( indices . length ) ;
357+ const pairs : [ number , number ] [ ] = [ ] ;
358358 for ( let i = 0 ; i < indices . length ; i ++ ) {
359359 const v = getter ( this . tile . record_batch . get ( indices [ i ] ) ) ;
360- pairs [ i ] = [ v , indices [ i ] ] ;
360+ pairs . push ( [ v , indices [ i ] ] ) ;
361361 }
362362 pairs . sort ( ( a , b ) => a [ 0 ] - b [ 0 ] ) ;
363363 const values = new Float64Array ( indices . length ) ;
@@ -1046,7 +1046,7 @@ export class SortedDataSelection extends DataSelection {
10461046 {
10471047 name : Math . random ( ) . toFixed ( 10 ) . slice ( 2 ) ,
10481048 tileFunction : async ( tile : Tile ) : Promise < Vector < Bool > > =>
1049- tile . get_column ( sel . name ) ,
1049+ ( await tile . get_column ( sel . name ) ) as Vector < Bool > ,
10501050 } ,
10511051 sortOperation ,
10521052 neededFields ,
@@ -1064,6 +1064,10 @@ export class SortedDataSelection extends DataSelection {
10641064 ) ;
10651065 newer . tiles = await Promise . all ( withSort ) ;
10661066 newer . selectionSize = newer . tiles . reduce ( ( sum , t ) => sum + t . matchCount , 0 ) ;
1067+ newer . evaluationSetSize = newer . tiles . reduce (
1068+ ( sum , t ) => sum + t . tile . manifest . nPoints ,
1069+ 0 ,
1070+ ) ;
10671071 return newer ;
10681072 }
10691073 // In addition to the regular things, we also need to add sort fields.
0 commit comments