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
* feat: Introduce create_udwf method for User-Defined Window Functions
- Added `create_udwf` static method to `WindowUDF` class, allowing users to create User-Defined Window Functions (UDWF) as both a function and a decorator.
- Updated type hinting for `_R` using `TypeAlias` for better clarity.
- Enhanced documentation with usage examples for both function and decorator styles, improving usability and understanding.
* refactor: Simplify UDWF test suite and introduce SimpleWindowCount evaluator
- Removed multiple exponential smoothing classes to streamline the code.
- Introduced SimpleWindowCount class for basic row counting functionality.
- Updated test cases to validate the new SimpleWindowCount evaluator.
- Refactored fixture and test functions for clarity and consistency.
- Enhanced error handling in UDWF creation tests.
* fix: Update type alias import to use typing_extensions for compatibility
* Add udwf tests for multiple input types and decorator syntax
* replace old def udwf
* refactor: Simplify df fixture by passing ctx as an argument
* refactor: Rename DataFrame fixtures and update test functions
- Renamed `df` fixture to `complex_window_df` for clarity.
- Renamed `simple_df` fixture to `count_window_df` to better reflect its purpose.
- Updated test functions to use the new fixture names, enhancing readability and maintainability.
* refactor: Update udwf calls in WindowUDF to use BiasedNumbers directly
- Changed udwf1 to use BiasedNumbers instead of bias_10.
- Added udwf2 to call udwf with bias_10.
- Introduced udwf3 to demonstrate a lambda function returning BiasedNumbers(20).
* feat: Add overloads for udwf function to support multiple input types and decorator syntax
* refactor: Simplify udwf method signature by removing redundant type hints
* refactor: Remove state_type from udwf method signature and update return type handling
- Eliminated the state_type parameter from the udwf method to simplify the function signature.
- Updated return type handling in the _function and _decorator methods to use a generic type _R for better type flexibility.
- Enhanced the decorator to wrap the original function, allowing for improved argument handling and expression return.
* refactor: Update volatility parameter type in udwf method signature to support Volatility enum
* Fix ruff errors
* fix C901 for def udwf
* refactor: Update udwf method signature and simplify input handling
- Changed the type hint for the return type in the _create_window_udf_decorator method to use pa.DataType directly instead of a TypeVar.
- Simplified the handling of input types by removing redundant checks and directly using the input types list.
- Removed unnecessary comments and cleaned up the code for better readability.
- Updated the test for udwf to use parameterized tests for better coverage and maintainability.
* refactor: Rename input_type to input_types in udwf method signature for clarity
* refactor: Enhance typing in udf.py by introducing Protocol for WindowEvaluator and improving import organization
* Revert "refactor: Enhance typing in udf.py by introducing Protocol for WindowEvaluator and improving import organization"
This reverts commit 16dbe5f.
0 commit comments