Skip to content

Commit c77394b

Browse files
committed
Fix legacy aggregators
1 parent e9634cd commit c77394b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

hub/hub.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,10 +290,15 @@ func (h *Hub) Scan(columns []string, quals *proto.Quals, limit int64, opts types
290290
scanTraceCtx := h.traceContextForScan(table, columns, limit, qualMap, connectionName)
291291

292292
var iterator Iterator
293+
// if this is an aggregate connection, create a group iterator
294+
if h.IsLegacyAggregatorConnection(connectionName) {
295+
iterator, err = newLegacyGroupIterator(connectionName, table, qualMap, columns, limit, h, scanTraceCtx)
296+
log.Printf("[TRACE] Hub Scan() created aggregate iterator (%p)", iterator)
293297

294-
iterator, err = h.startScanForConnection(connectionName, table, qualMap, columns, limit, scanTraceCtx)
295-
log.Printf("[TRACE] Hub Scan() created iterator (%p)", iterator)
296-
298+
} else {
299+
iterator, err = h.startScanForConnection(connectionName, table, qualMap, columns, limit, scanTraceCtx)
300+
log.Printf("[TRACE] Hub Scan() created iterator (%p)", iterator)
301+
}
297302
if err != nil {
298303
log.Printf("[TRACE] Hub Scan() failed :( %s", err)
299304
return nil, err

0 commit comments

Comments
 (0)