sqlite-jdbc
sqlite-jdbc copied to clipboard
Some of new math function are missing
Since SQLite 3.35.0 version there should be new math functions provided but some of them are unsupported by Xerial implementation:
Please consider to add support for those functions.
Until now the native library was built by adding extension-functions.c (from https://sqlite.org/contrib), which contains some math functions, among others.
If we enable the new math functions it generates a conflict, so we need to adjust that extension-functions.c file.
There is one thing we need to be careful about, currently log(X) performs the natural logarithm ln(X), but in the new math functions there is a dedicated ln(X), as well as log10(X) and log2(X). log(x) in the new math functions is an alias for log10(X). This will be a breaking change, so i will hold off on that until we release the next major version (3.40.0), and mark that down in the release notes.
Note: This file (https://sqlite.org/contrib/download/extension-functions.c?get=25) is partially obsolete and included in SQLite. It needs to be revised first.
Note: This file (https://sqlite.org/contrib/download/extension-functions.c?get=25) is partially obsolete and included in SQLite. It needs to be revised first.
It's still relevant for functions that are not natively in SQLite, and would still be needed when compiling without SQLITE_ENABLE_MATH_FUNCTIONS.
Note: This file (https://sqlite.org/contrib/download/extension-functions.c?get=25) is partially obsolete and included in SQLite. It needs to be revised first.
It's still relevant for functions that are not natively in SQLite, and would still be needed when compiling without
SQLITE_ENABLE_MATH_FUNCTIONS.
For the diff it makes sense, but why compile with and then add the extensions file?
Note: This file (https://sqlite.org/contrib/download/extension-functions.c?get=25) is partially obsolete and included in SQLite. It needs to be revised first.
It's still relevant for functions that are not natively in SQLite, and would still be needed when compiling without
SQLITE_ENABLE_MATH_FUNCTIONS.For the diff it makes sense, but why compile with and then add the extensions file?
You can see my WIP here, i've used #ifndef SQLITE_ENABLE_MATH_FUNCTIONS to skip stuff we don't need if the math functions will be enabled.