You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(sql_execution): Fix is large number check to use 2**53 as cutoff (#73)
* fix(sql_execution): Fix is large number check to use 2**53 as cutoff
* feat(pandas): Add functionality to cast large numbers to strings for JSON compatibility
- Introduced `cast_large_numbers_to_string` function to convert numeric values exceeding the float64 safe integer range (2**53) to strings, preserving precision for JSON serialization.
- Updated `PandasImplementation.to_json` method to utilize the new function.
- Added unit tests to ensure correct behavior for large numbers in dataframes.
* refactor(pandas): Improve readability of large number checks in utils.py
- Reformatted the `is_large_number` and `cast_large_numbers_to_string` functions for better readability by using multi-line expressions.
- Updated unit tests to call the `is_large_number` function directly instead of through a different module, ensuring consistency and clarity in test cases.
* Remove unused import
* Add type hints to cast_large_numbers_to_string
Add explicit pd.DataFrame input and return type annotations to
cast_large_numbers_to_string so callers and static type checkers
(mypy) recognise the typed signature.
* Add type hint Any to is_large_number parameter
Import typing.Any and annotate the x parameter of is_large_number
so static type checkers (mypy) accept the function signature.
0 commit comments