Conversation
|
馃摝 Opteryx build version: |
There was a problem hiding this comment.
Pull Request Overview
This pull request addresses issue #2709 related to INT to date handling error by improving type conversion and error handling in the date functions and filter operations.
Key changes:
- Enhanced INT to datetime conversion to handle PyArrow data types
- Improved filter node execution with better type checking and simplified logic
- Version bump to 0.25.0-beta
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| opteryx/functions/date_functions.py | Added support for PyArrow ChunkedArray and Array types in INT64 to datetime conversion |
| opteryx/operators/filter_node.py | Simplified filter logic, improved type checking, and removed redundant error handling |
| opteryx/version.py | Updated version to 0.25.0-beta and incremented build number |
| mask = pyarrow.array(mask, type=pyarrow.bool_()) | ||
|
|
There was a problem hiding this comment.
The removal of exception handling around the mask conversion could cause unhandled exceptions. Consider adding back error handling with a more specific error message to help users understand what went wrong during mask conversion.
| # Ensure mask is a BooleanArray | ||
| if not isinstance(mask, pyarrow.BooleanArray): | ||
| mask = pyarrow.array(mask, type=pyarrow.bool_()) | ||
|
|
There was a problem hiding this comment.
The condition if indices.size > 0: is insufficient. The original code also checked not numpy.all(mask is None) which prevented issues when the mask contains None values. Removing this check could lead to unexpected behavior when dealing with null values in the filter condition.
| # Check if mask contains only None values | |
| if numpy.all(mask is None): | |
| yield morsel.slice(0, 0) | |
| return |
|
Please retry analysis of this Pull-Request directly on SonarQube Cloud |
|
馃摝 Opteryx build version: |
Thank you for opening a Pull Request!
We appreciate your contribution to Opteryx. Your time and effort make a difference, and we鈥檙e excited to review your changes. To help ensure a smooth review process, please check the following:
Checklist for a Successful PR
Fixes: #2709
Please replace
<issue_number_goes_here>with the corresponding issue number.Thank you for contributing to Opteryx! 馃帀