You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason will be displayed to describe this comment to others. Learn more.
the driver-provided size validation is well scoped and the normal fetch and arrow paths hold up. I found one suggestion worth incorporating before merge, so requesting changes.
Reject short, zero, or oversized driver indicators for fixed C bindings before standard-row or Arrow processors read the reusable rowset buffers.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This completion logic still omits SQL_NO_DATA. After a truncating SQL_NO_TOTAL chunk, ODBC may complete the sequence with SQL_NO_DATA; unlike GetDataVar at lines 5676-5686, this direct LOB path treats that status as an error before reaching this break and raises for an otherwise completed value. Handle SQL_NO_DATA before reading the now-undefined indicator, accepting it only after payload progress, and add the corresponding injected LOB sequence.
Apply fixed-width and decimal indicator bounds before SQLGetData conversions used by fetchone and LOB-containing batches, with injected malformed-driver regressions.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Avoid per-cell type dispatch for invariant column widths
mssql_python/pybind/ddbc_bindings.cpp:5180
This restores a type switch for every fetched cell, even though dataType is invariant per column and the dispatch table above explicitly precomputes shape-dependent work to avoid that hot-loop cost. Precompute the expected fixed width in ColumnInfo while caching metadata, then make this per-cell validation a simple zero-or-equality check; that preserves the new safety check without adding repeated type dispatch to rows × columns processing.
This issue also appears on line 6644 of the same file.
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
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.
Work Item / Issue Reference
Summary
Stacked on #802 so this review contains only driver-provided fetch validation.