-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
sqlite3: expose sqlite3_create_window_function #84797
Comments
Expose sqlite3_create_window_function as sqlite3.create_window_function. There already exists sqlite3.create_aggregate, which uses sqlite3_create_function_v2 and is conceptually similar. Window functions are available in sqlite starting from 2018-09-15 (3.25.0) release. References: |
This is a good idea, but I think the Python interface should stay the same. From the user perspective, you'd only need to implement the 'value' and 'inverse' callbacks to transform your aggregate class into an aggregate window class. From the CPython perspective, we'd only need to use sqlite3_create_window_function() instead of sqlite3_create_function_v2(), if we are compiling against SQLite 3.25.3 or newer. I guess it would be nice to output a warning if the user aggregate class contains 'value' and 'inverse' callbacks, but sqlite3 _doesn't_ support aggregate window functions. |
On a second thought and with regards to error reporting, it _would_ make sense to expose this as a function instead of embedding it into sqlite3.create_aggregate. |
Please see attached patch, @iljau. |
Another possibility (instead of adding
Maybe that's a little bit cleaner regarding the Python interface. |
Duplicate of bpo-34916 |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: