-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
include built-in Math functions in SQLite to 3.35.0 of march 2021 #86852
Comments
SQlite-3.35.0 of mach 2021 will have Built-In Math Functions option. https://sqlite.org/draft/releaselog/3_35_0.html Would it be possible to have it activated in the following versions update of Python ? It's pretty usefull for some basic statistics |
As far as I can tell, every one of those are already available in Python. |
I see no reason not to build SQLite with -DSQLITE_ENABLE_MATH_FUNCTIONS for the Windows and macOS builds. Why take the detour through the Python library when you can use the built-in SQLite functions? The change is trivial: Add -DSQLITE_ENABLE_MATH_FUNCTIONS to PCbuild/sqlite3.vcxproj and Mac/BuildScript/build-installer.py. |
Seems like the math functions will be included by default anyways, so we'll have to explicitly exclude them if we don't want them. https://www.sqlite.org/draft/compile.html#enable_math_functions: |
It is probably harmless to enable the option, especially if it will be |
There are number of reasons it might be more convenient in SQL. For example, it could be handy to create views measured in degrees instead of radians. That might make where clauses in queries a little easier to read.
So, can this be closed? |
For macOS, the SQLITE_ENABLE_MATH_FUNCTIONS option is enabled by default, but I'm not sure about the Windows build. The SQLite docs says: |
Using SQLite 3.35.0 nightly build, building Python using PCbuild/build.bat and PCBuild\pcbuild.sln with VS 2017 (does this reflect how the Windows team build the installers?), I can confirm that math functions are _not_ included by default. I added SQLITE_ENABLE_MATH_FUNCTIONS to PCbuild/sqlite3.vcxproj, but then VS 2017 fails building sqlite: 1>------ Rebuild All started: Project: sqlite3, Configuration: Debug Win32 ------ (Note, I've overwritten the files in the externals\sqlite-3.33.0.0 directory with the nightly build.) |
FYI, I've opened a thread on the SQLite Forum: https://sqlite.org/forum/forumpost/721645dc36 |
it seems resolved now, at least with VS 2019 |
Yes, R. Hipp has fixed this here: https://www2.sqlite.org/cgi/src/info/e5d7209e118a8453 |
Steve, I've put up a PR that prepares the Windows build for this. Would you mind taking a look at it? |
See bpo-43492 for upgrading the macOS & Windows installers to SQLite 3.35.0. |
Merged into 3.10 and 3.11. |
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: