FIX: Improvement to parameter type inference and handling by gargsaumya · Pull Request #215 · microsoft/mssql-python

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got this from Copilot:

Missing test coverage for:

Batch decimal precision/scale aggregation
Large string threshold (NVARCHAR vs NVARCHAR(MAX)) including astral (UTF‑16 surrogate pair) edge cases
executemany sampling when a later row crosses the 4000 UTF‑16 unit boundary
Mixed Unicode/non-Unicode large strings (type chosen, DAE flag)
All‑NULL column inference (no crash, consistent default type)
Mixed bool and int values (BIT vs widen to INT)
Mixed numeric & string column fallback (string coercion, no silent truncation)
Large negative integers (e.g. −2^63+1) and 64‑bit boundary extremes (±2^63−1, ±2^31, etc.)
Mixed bool + very large int (widening logic)
Astral-heavy string where len(s) < 4000 but UTF‑16 units > 4000 (correct MAX path)
Large binary (>8000) bytes vs bytearray parity (same SQL type + isDAE)
Binary exactly at 8000 and just over (boundary behavior)
All parameters None in a column (executemany robustness)

Some tests may not be worth, so take your call and select the relevant ones.