PECO-1054 Expose Arrow batches to users, part three#166
Merged
rcypher-databricks merged 6 commits intoSep 29, 2023
Conversation
rcypher-databricks
requested review from
andrefurlan-db,
jadewang-db,
susodapop and
yunbodeng-db
as code owners
September 22, 2023 20:11
| conn, _ := db.Conn(context.BackGround()) | ||
| defer conn.Close() | ||
|
|
||
| query := `select * from hive_metastore.main.taxi_trip_data` |
Contributor
There was a problem hiding this comment.
change to UC. main.default.<>
| ctx2, cancel2 := context.WithTimeout(context.Background(), 30*time.Second) | ||
| defer cancel2() | ||
|
|
||
| batches, err := rows.(dbsqlrows.DBSQLRows).GetArrowBatches(ctx2) |
Contributor
There was a problem hiding this comment.
is DBSQL something that we actually expose externally as an acronym? Any alternatives to this?
andrefurlan-db
left a comment
Contributor
There was a problem hiding this comment.
just a couple of annoying comments to make sure we name things that we expose as interface correctly. The rest looks awesome!
Added DBSqlRows and DBSQLArrowBatchIterator public interfaces. Added arrowRecordIterator which implements DBSQLArrowBatchIterator. Moved closing the db operation from rows type into resultPageIterator as well as properties that are only used by resultPageIterator. Added GetArrowBatches function to rows and arrowRowScanner types. Added HasNext function to BatchIterator and SparkArrowBatch interfaces. Added example for accessing Arrow batches and updated doc.go Signed-off-by: Raymond Cypher <raymond.cypher@databricks.com>
Signed-off-by: Raymond Cypher <raymond.cypher@databricks.com>
Signed-off-by: Raymond Cypher <raymond.cypher@databricks.com>
Renamed DBSQLRows and DBSQLArrowBatchIterator to Rows and ArrowBatchIterator by dropping the DBSQL prefix. Updated example to use UC Signed-off-by: Raymond Cypher <raymond.cypher@databricks.com>
rcypher-databricks
force-pushed
the
arrow_batches
branch
from
September 28, 2023 17:35
6930fa2 to
ea722ff
Compare
Signed-off-by: Raymond Cypher <raymond.cypher@databricks.com>
rcypher-databricks
force-pushed
the
arrow_batches
branch
from
September 28, 2023 17:39
442bd9e to
e42a5db
Compare
Signed-off-by: Raymond Cypher <raymond.cypher@databricks.com>
mani-mathur-arch
added a commit
that referenced
this pull request
Jul 16, 2026
Bumps the kernel pin from the placeholder statement-surface rev to the tip of the tier2-features branch (databricks-sql-kernel#167 @ 02c0a43), the head of the unmerged kernel PR stack (#165 -> #166 cancel-token -> #167 tier2). It's a linear superset carrying every new C-ABI symbol these driver branches link against: kernel_session_open_cancellable / kernel_result_stream_next_batch_cancellable (cancel token, #166) plus kernel_abi_version, kernel_session_close_blocking, set_tls_client_certificate, set_cloudfetch_enabled (#167). The kernel-lib build fetches the bare commit via its PR-head-ref fallback, so an unmerged SHA is buildable. Temporary: re-pin to the squash-merge SHA once the kernel stack lands. Co-authored-by: Isaac Signed-off-by: Mani Kaustubh Mathur <mani.mathur@databricks.com>
mani-mathur-arch
added a commit
that referenced
this pull request
Jul 17, 2026
Bumps the kernel pin from the placeholder statement-surface rev to the tip of the tier2-features branch (databricks-sql-kernel#167 @ 02c0a43), the head of the unmerged kernel PR stack (#165 -> #166 cancel-token -> #167 tier2). It's a linear superset carrying every new C-ABI symbol these driver branches link against: kernel_session_open_cancellable / kernel_result_stream_next_batch_cancellable (cancel token, #166) plus kernel_abi_version, kernel_session_close_blocking, set_tls_client_certificate, set_cloudfetch_enabled (#167). The kernel-lib build fetches the bare commit via its PR-head-ref fallback, so an unmerged SHA is buildable. Temporary: re-pin to the squash-merge SHA once the kernel stack lands. Co-authored-by: Isaac Signed-off-by: Mani Kaustubh Mathur <mani.mathur@databricks.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added DBSqlRows and DBSQLArrowBatchIterator public interfaces.
Added arrowRecordIterator which implements DBSQLArrowBatchIterator.
Moved closing the database operation from rows type into resultPageIterator as well as properties that are only used by resultPageIterator.
Added GetArrowBatches function to rows and arrowRowScanner types.
Added HasNext function to BatchIterator and SparkArrowBatch interfaces.
Added example for accessing Arrow batches and updated doc.go