Skip to content

Commit a9598a0

Browse files
committed
comments and code rfactoring
1 parent 4cf6e0f commit a9598a0

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

internal/table/scanner/result.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ func (r *unaryResult) NextResultSet(ctx context.Context, columns ...string) bool
163163
}
164164

165165
func (r *streamResult) nextResultSetErr(ctx context.Context, columns ...string) (err error) {
166+
// skipping second recv because first call of recv is from New Stream(), second call is from user
166167
if r.nextResultSetCounter.Add(1) == 2 {
167168
r.setColumnIndexes(columns)
168169
return ctx.Err()

internal/table/session.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,6 @@ func (s *session) StreamReadTable(
990990
ctx, cancel := xcontext.WithCancel(ctx)
991991

992992
stream, err = s.tableService.StreamReadTable(ctx, &request)
993-
994993
if err != nil {
995994
cancel()
996995
return nil, xerrors.WithStackTrace(err)
@@ -1117,7 +1116,6 @@ func (s *session) StreamExecuteScanQuery(
11171116
ctx, cancel := xcontext.WithCancel(ctx)
11181117

11191118
stream, err = s.tableService.StreamExecuteScanQuery(ctx, &request, callOptions...)
1120-
11211119
if err != nil {
11221120
cancel()
11231121
return nil, xerrors.WithStackTrace(err)

0 commit comments

Comments
 (0)