@@ -648,24 +648,23 @@ func (h *Hub) shouldPushdownLimit(table string, qualMap map[string]*proto.Quals,
648648
649649// StartScan starts a scan (for scanIterators only = legacy iterators will have already started)
650650func (h * Hub ) StartScan (i Iterator ) error {
651+ // iterator must be a scan iterator
651652 // if iterator is not a scan iterator, do nothing
652653 iterator , ok := i .(* scanIterator )
653654 if ! ok {
654655 return nil
655656 }
656657
657- // iterator must be a scan iterator
658658 // ensure we do not call execute too frequently
659659 h .throttle ()
660660
661661 table := iterator .table
662662 connectionPlugin := iterator .connectionPlugin
663- callId := grpc .BuildCallId ()
664663
665664 req := & proto.ExecuteRequest {
666- Table : table ,
667- QueryContext : iterator .queryContext ,
668- CallId : callId ,
665+ Table : table ,
666+ QueryContext : iterator .queryContext ,
667+ CallId : iterator . callId ,
669668 // pass connection name - used for aggregators
670669 Connection : iterator .ConnectionName (),
671670 TraceContext : grpc .CreateCarrierFromContext (iterator .traceCtx .Ctx ),
@@ -684,7 +683,7 @@ func (h *Hub) StartScan(i Iterator) error {
684683 req .ExecuteConnectionData [connectionName ] = data
685684 }
686685
687- log .Printf ("[INFO] StartScan for table: %s, callId %s, cache enabled: %v, iterator %p" , table , callId , req .CacheEnabled , iterator )
686+ log .Printf ("[INFO] StartScan for table: %s, cache enabled: %v, iterator %p, %d quals (%s) " , table , req .CacheEnabled , iterator , len ( iterator . queryContext . Quals ), iterator . callId )
688687 stream , ctx , cancel , err := connectionPlugin .PluginClient .Execute (req )
689688 // format GRPC errors and ignore not implemented errors for backwards compatibility
690689 err = grpc .HandleGrpcError (err , connectionPlugin .PluginName , "Execute" )
@@ -773,7 +772,7 @@ func (h *Hub) cacheTTL(connectionName string) time.Duration {
773772 // ask the steampipe config for resolved plugin options - this will use default values where needed
774773 connectionOptions := steampipeconfig .GlobalConfig .GetConnectionOptions (connectionName )
775774
776- // the config loading code shouls ALWAYS populate the connection options, using defaults if needed
775+ // the config loading code should ALWAYS populate the connection options, using defaults if needed
777776 if connectionOptions .CacheTTL == nil {
778777 panic (fmt .Sprintf ("No cache options found for connection %s" , connectionName ))
779778 }
0 commit comments