Skip to content

Commit 43c5b89

Browse files
committed
add logging
1 parent 8261d9a commit 43c5b89

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

hub/scan_iterator_base.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,11 @@ func (i *scanIteratorBase) populateRow(row *proto.Row) (map[string]interface{},
236236
i.setError(err)
237237
return nil, err
238238
}
239+
log.Printf("[INFO] populateRow >> JSON value - column: %q, val: %#v, raw_bytes: %q", columnName, val, bytes)
239240
} else if timestamp := column.GetTimestampValue(); timestamp != nil {
240241
// convert from protobuf timestamp to a RFC 3339 time string
241242
val = ptypes.TimestampString(timestamp)
243+
log.Printf("[INFO] populateRow >> Timestamp value - column: %q, val: %q, raw_bytes: %q", columnName, val, bytes)
242244
} else {
243245
// get the first field descriptor and value (we only expect column message to contain a single field
244246
column.ProtoReflect().Range(func(descriptor protoreflect.FieldDescriptor, v protoreflect.Value) bool {
@@ -250,6 +252,7 @@ func (i *scanIteratorBase) populateRow(row *proto.Row) (map[string]interface{},
250252
}
251253
return false
252254
})
255+
log.Printf("[INFO] populateRow >> Fallback value - column: %q, val: %#v, raw_bytes: %q", columnName, val, bytes)
253256
}
254257
res[columnName] = val
255258
}
@@ -308,6 +311,7 @@ func (i *scanIteratorBase) readPluginResult(ctx context.Context) bool {
308311
// update the scan metadata for this connection (this will overwrite any existing from the previous row)
309312
i.scanMetadata[rowResult.Connection] = i.newScanMetadata(rowResult.Connection, rowResult.Metadata)
310313

314+
log.Printf("[INFO] readPluginResult rowResult: %q", rowResult.Row)
311315
// so we have a row
312316
i.rows <- rowResult.Row
313317
}

0 commit comments

Comments
 (0)