Skip to content

Commit

Permalink
Updated example and docs for GetArrowBatches
Browse files Browse the repository at this point in the history
Updated the example and documentation for GetArrowBatches to include releasing the arrow batch.
Signed-off-by: Raymond Cypher <[email protected]>
  • Loading branch information
rcypher-databricks committed Oct 2, 2023
1 parent e95dd4a commit f1676f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ Example usage:
log.Printf("batch %v: nRecords=%v\n", iBatch, b.NumRows())
iBatch += 1
nRows += int(b.NumRows())
b.Release()
}
log.Printf("NRows: %v\n", nRows)
}
Expand Down
2 changes: 2 additions & 0 deletions examples/arrrowbatches/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ func loopWithHasNext(db *sql.DB) {
log.Printf("batch %v: nRecords=%v\n", iBatch, b.NumRows())
iBatch += 1
nRows += int(b.NumRows())
b.Release()
}
log.Printf("NRows: %v\n", nRows)
}
Expand Down Expand Up @@ -128,6 +129,7 @@ func loopWithNext(db *sql.DB) {
log.Printf("batch %v: nRecords=%v\n", iBatch, b.NumRows())
iBatch += 1
nRows += int(b.NumRows())
b.Release()
}

log.Printf("NRows: %v\n", nRows)
Expand Down

0 comments on commit f1676f2

Please sign in to comment.