FIX: Fixed and Added tests for Type Inference Bug#252
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request addresses a type inference bug by removing the _select_best_sample_value static method and consolidating type inference logic into the existing _compute_column_type method.
- Removes redundant
_select_best_sample_valuemethod that was duplicating type inference logic - Updates
executemanymethod to use_compute_column_typefor consistent sample value selection - Simplifies the codebase by eliminating duplicate logic for type inference
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
merging main here to test and check code coverage |
📊 Code Coverage Report
Diff CoverageDiff: main...HEAD, staged and unstaged changesNo lines with coverage information in this diff. 📋 Files Needing Attention📉 Files with overall lowest coverage (click to expand)mssql_python.pybind.connection.connection.cpp: 68.3%
mssql_python.ddbc_bindings.py: 68.5%
mssql_python.pybind.ddbc_bindings.cpp: 69.4%
mssql_python.pybind.connection.connection_pool.cpp: 78.9%
mssql_python.cursor.py: 79.3%
mssql_python.connection.py: 81.7%
mssql_python.helpers.py: 84.7%
mssql_python.auth.py: 85.3%
mssql_python.type.py: 86.8%
mssql_python.pooling.py: 88.8%🔗 Quick Links
|
sumitmsft
left a comment
There was a problem hiding this comment.
Left a few test cases to add
e304deb to
04a7842
Compare
Work Item / Issue Reference
Summary
This pull request removes the
_select_best_sample_valuestatic method and updates how sample values are selected for type inference in theexecutemanymethod. Instead of using the old method, the code now relies on_compute_column_typeto determine sample values and type information.Refactoring and Type Inference Updates:
_select_best_sample_valuestatic method fromcursor.py, consolidating the logic for type inference.executemanymethod to use_compute_column_typefor determining sample values, minimum, and maximum values for each column, improving clarity and maintainability.