Skip to content
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

log() SQL function only supports natural logarithm #3416

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

log() SQL function only supports natural logarithm #3416

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
enhancement New feature or request SQL

Comments

@monetdb-team
Copy link

Date: 2014-01-07 17:01:49 +0100
From: @hannesmuehleisen
To: SQL devs <>
Version: -- development
CC: @kutsurak

Last updated: 2019-04-30 12:36:04 +0200

Comment 19441

Date: 2014-01-07 17:01:49 +0100
From: @hannesmuehleisen

User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.68 Safari/537.36
Build Identifier:

While it is great to have a natural logarithm function in MonetDB, sometimes other bases are required. For example, MySQL and SQL Server support a second parameter to LOG(), which defines the base.

Reproducible: Always

Steps to Reproduce:

  1. SELECT LOG(42,2);

Actual Results:

SELECT: no such binary operator 'log(tinyint,tinyint)'

Expected Results:

5.392317

Comment 21238

Date: 2015-08-31 15:51:24 +0200
From: @kutsurak

Created attachment 348
Proposed patch for the enhancement

Hi,

this patch adds the functionality described in this issue. Hopefully you'll find it useful. I have only tried this on Linux, but I don't expect it to create problems on other platforms.

Best regards,
Panos.

Attached file: log_base.patch (text/plain, 5077 bytes)
Description: Proposed patch for the enhancement

Comment 21239

Date: 2015-08-31 16:06:28 +0200
From: @kutsurak

Created attachment 349
Corrected patch

I think I made a mistake with the previous patch (I used hg log -r ), and it did not keep the original commit message. This one was created using hg export, so hopefully it should be OK.

Sorry about this, I am new with Mercurial :)

Best regards,
Panos.

Attached file: log_base.patch (text/plain, 5214 bytes)
Description: Corrected patch

Comment 26837

Date: 2019-01-22 15:07:27 +0100
From: MonetDB Mercurial Repository <>

Changeset a116ae0c1407 made by Sjoerd Mullender sjoerd@acm.org in the MonetDB repo, refers to this bug.

For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=a116ae0c1407

Changeset description:

Implemented a two argument log function.
This fixed bug #3416.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request SQL
Projects
None yet
Development

No branches or pull requests

2 participants