| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Updates the Arrow fetch path in the C++ pybind layer to always request SQL_CHAR/SQL_VARCHAR data as SQL_C_WCHAR (UTF-16) so Arrow results are correct regardless of server/client codepage, locale, or platform—addressing the VARCHAR non-ASCII decoding issues reported in #553.
Changes:
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| mssql_python/pybind/ddbc_bindings.cpp | Changes Arrow batch binding and fetch handling so VARCHAR is requested as SQL_C_WCHAR, ensuring consistent Unicode correctness. |
| tests/test_004_cursor_arrow.py | Adds a regression test to validate Arrow output for Unicode data stored in VARCHAR with UTF-8 collation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
|
/azp run |
Sorry, something went wrong.
|
Azure Pipelines successfully started running 1 pipeline(s). |
Sorry, something went wrong.
|
/azp run |
Sorry, something went wrong.
|
Azure Pipelines successfully started running 1 pipeline(s). |
Sorry, something went wrong.
📊 Code Coverage Report
Diff CoverageDiff: main...HEAD, staged and unstaged changes
Summary
mssql_python/pybind/ddbc_bindings.cppLines 4629-4639 4629
4630 SQLRETURN FetchArrowBatch_wrap(SqlHandlePtr StatementHandle, py::list& capsules,
4631 int arrowBatchSize,
4632 int charCtype) {
! 4633 // Fetch narrow char data as SQL_C_CHAR if on Linux/macOS and configured by the user
! 4634 charCtype = EffectiveCharCtypeForFetch(charCtype, "utf-8");
! 4635
4636 // An overly large fetch size doesn't seem to help performance
4637 int fetchSize = 64;
4638
4639 SQLRETURN ret;📋 Files Needing Attention📉 Files with overall lowest coverage (click to expand)mssql_python.pybind.logger_bridge.cpp: 59.2%
mssql_python.pybind.ddbc_bindings.h: 59.9%
mssql_python.pybind.logger_bridge.hpp: 70.8%
mssql_python.pybind.connection.connection.cpp: 76.2%
mssql_python.pybind.ddbc_bindings.cpp: 76.4%
mssql_python.row.py: 76.9%
mssql_python.__init__.py: 77.3%
mssql_python.ddbc_bindings.py: 79.6%
mssql_python.logging.py: 85.5%
mssql_python.connection.py: 85.6%🔗 Quick Links
|
Sorry, something went wrong.
[AB#45983](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/45983) Release mssql-python v1.10.0. This PR bumps the driver version from 1.9.0 to 1.10.0 across `mssql_python/__init__.py`, `setup.py`, and updates `PyPI_Description.md` with this release's customer-facing changes. ### Summary **Enhancements** - **Active Directory Service Principal support for Bulk Copy** ([#576](#576)) - `bulkcopy` now supports `Authentication=ActiveDirectoryServicePrincipal`, registering a token-provider callback that resolves the tenant from the STS URL mid-handshake and returns a service-principal JWT. **Bug Fixes** - **Non-ASCII VARCHAR data in the Arrow fetch path** ([#575](#575)) - The Arrow fetch path now requests `SQL_CHAR` data as `SQL_C_WCHAR` (UTF-16LE), ensuring correct decoding regardless of encoding settings, locale, or OS. Thanks @ffelixg for the contribution! - **Bulk load connection timeouts** ([#641](#641)) - Fixed connection timeouts during bulk load operations. Fix lands in the Rust core via bumping `mssql_py_core` from 0.1.4 to 0.1.5. *(via `mssql_py_core`)* **Version bump** - `mssql_python/__init__.py`: `__version__ = "1.10.0"` - `setup.py`: `version="1.10.0"` - `PyPI_Description.md`: updated `## What's new in v1.10.0` section
| Back | FazBrowse Home | New Git URL |
Work Item / Issue Reference
Summary
Due to #495, we can now request SQL_CHAR data as SQL_C_WCHAR, i.e. utf16le strings. Doing this for the arrow path ensures that arrow methods always return correct data no matter the encoding settings / locale / operating system. There does not seem to be any significant negative performance impact.