FIX: Use normalized size for DAE selection - #778
ttk (Theekshna) wants to merge 1 commit into
Conversation
Co-authored-by: Copilot App <[email protected]>
There was a problem hiding this comment.
🟢 Approval recommended
The change is narrowly scoped, aligns with the stated fix intent, and includes targeted test coverage updates for the affected behavior.
Pull request overview
This PR adjusts the native parameter override path (setinputsizes) so data-at-execution (DAE) streaming decisions are based on the normalized/clamped parameter metadata (as stored in ParamInfo) rather than the raw caller-provided columnSize object. This specifically prevents oversized DECIMAL/NUMERIC declarations from accidentally forcing DAE when the value is formatted to a short string, while keeping DAE behavior for genuinely large character/binary declarations.
Changes:
- Switch DAE gating in
ApplyInputSizeOverridefrom comparing the rawcolumnSizePyObject to comparinginfo.columnSize(post normalization/clamp). - Add a regression test for setinputsizes-driven character DAE and clarify the intent of the oversized numeric metadata test.
File summaries
| File | Description |
|---|---|
mssql_python/pybind/param_detect.hpp |
Uses normalized/clamped info.columnSize for DAE selection after applying input-size overrides, avoiding oversized numeric metadata triggering DAE. |
tests/test_023_execute_path_parity.py |
Adds a setinputsizes character-size regression test and updates the numeric clamp test’s intent description to match the DAE-selection fix. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
📊 Code Coverage Report
Diff CoverageDiff: main...HEAD, staged and unstaged changes
Summary
📋 Files Needing Attention📉 Files with overall lowest coverage (click to expand)mssql_python.pybind.performance_counter.hpp: 0.7%
mssql_python.pybind.logger_bridge.cpp: 57.9%
mssql_python.pybind.ddbc_bindings.h: 61.5%
mssql_python.pybind.logger_bridge.hpp: 70.8%
mssql_python.row.py: 77.6%
mssql_python.pybind.ddbc_bindings.cpp: 77.7%
mssql_python.pybind.connection.connection_pool.cpp: 81.8%
mssql_python.logging.py: 85.5%
mssql_python.helpers.py: 89.3%
mssql_python.pooling.py: 90.1%🔗 Quick Links
|
Reference: #736
Summary
Use normalized and clamped parameter metadata when selecting data-at-execution binding. This prevents oversized DECIMAL/NUMERIC declarations from incorrectly streaming short formatted Decimal values while preserving DAE for genuinely oversized character and binary declarations.
Validation
mssql_python\pybind\build.bat x64python -m black --check --line-length=100 tests\test_023_execute_path_parity.pypython -m pytest -q tests\test_000_dependencies.py(35 passed, 3 skipped)DB_CONNECTION_STRING; unavailable in this worktree