@@ -144,10 +144,10 @@ function createDataFrameDirectCountTest(table, column, test, value) {
144
144
let numBatches = batches . length ;
145
145
for ( let batchIndex = - 1 ; ++ batchIndex < numBatches ; ) {
146
146
// load batches
147
- const { numRows , columns } = batches [ batchIndex ] ;
148
- const vector = columns [ colidx ] ;
147
+ const batch = batches [ batchIndex ] ;
148
+ const vector = batch . getChildAt ( colidx ) ;
149
149
// yield all indices
150
- for ( let index = - 1 ; ++ index < numRows ; ) {
150
+ for ( let index = - 1 ; ++ index < batch . length ; ) {
151
151
sum += ( vector . get ( index ) >= value ) ;
152
152
}
153
153
}
@@ -159,10 +159,10 @@ function createDataFrameDirectCountTest(table, column, test, value) {
159
159
let numBatches = batches . length ;
160
160
for ( let batchIndex = - 1 ; ++ batchIndex < numBatches ; ) {
161
161
// load batches
162
- const { numRows , columns } = batches [ batchIndex ] ;
163
- const vector = columns [ colidx ] ;
162
+ const batch = batches [ batchIndex ] ;
163
+ const vector = batch . getChildAt ( colidx ) ;
164
164
// yield all indices
165
- for ( let index = - 1 ; ++ index < numRows ; ) {
165
+ for ( let index = - 1 ; ++ index < batch . length ; ) {
166
166
sum += ( vector . get ( index ) === value ) ;
167
167
}
168
168
}
@@ -173,7 +173,7 @@ function createDataFrameDirectCountTest(table, column, test, value) {
173
173
174
174
return {
175
175
async : true ,
176
- name : `name: '${ column } ', length: ${ table . numRows } , type: ${ table . columns [ colidx ] . type } , test: ${ test } , value: ${ value } \n` ,
176
+ name : `name: '${ column } ', length: ${ table . numRows } , type: ${ table . getColumnAt ( colidx ) . type } , test: ${ test } , value: ${ value } \n` ,
177
177
fn : op
178
178
} ;
179
179
}
@@ -183,7 +183,7 @@ function createDataFrameCountByTest(table, column) {
183
183
184
184
return {
185
185
async : true ,
186
- name : `name: '${ column } ', length: ${ table . numRows } , type: ${ table . columns [ colidx ] . type } \n` ,
186
+ name : `name: '${ column } ', length: ${ table . numRows } , type: ${ table . getColumnAt ( colidx ) . type } \n` ,
187
187
fn ( ) {
188
188
table . countBy ( column ) ;
189
189
}
@@ -204,7 +204,7 @@ function createDataFrameFilterCountTest(table, column, test, value) {
204
204
205
205
return {
206
206
async : true ,
207
- name : `name: '${ column } ', length: ${ table . numRows } , type: ${ table . columns [ colidx ] . type } , test: ${ test } , value: ${ value } \n` ,
207
+ name : `name: '${ column } ', length: ${ table . numRows } , type: ${ table . getColumnAt ( colidx ) . type } , test: ${ test } , value: ${ value } \n` ,
208
208
fn ( ) {
209
209
df . count ( ) ;
210
210
}
0 commit comments