-
Notifications
You must be signed in to change notification settings - Fork 24
FIX: Fixed and Added tests for Type Inference Bug #252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_value
method that was duplicating type inference logic - Updates
executemany
method to use_compute_column_type
for 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few test cases to add
e304deb
to
04a7842
Compare
Work Item / Issue Reference
Summary
This pull request removes the
_select_best_sample_value
static method and updates how sample values are selected for type inference in theexecutemany
method. Instead of using the old method, the code now relies on_compute_column_type
to determine sample values and type information.Refactoring and Type Inference Updates:
_select_best_sample_value
static method fromcursor.py
, consolidating the logic for type inference.executemany
method to use_compute_column_type
for determining sample values, minimum, and maximum values for each column, improving clarity and maintainability.