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

Broken type inference when using sql round #2987

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

Broken type inference when using sql round #2987

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

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2012-01-27 14:56:26 +0100
From: Holger <>
To: SQL devs <>
Version: -- development
CC: @njnes

Last updated: 2012-05-25 12:58:49 +0200

Comment 16837

Date: 2012-01-27 14:56:26 +0100
From: Holger <>

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.52.7 (KHTML, like Gecko) Version/5.1.2 Safari/534.52.7
Build Identifier: v11.7.1

sql>\f raw
sql>explain select round(750,1);
% .explain table_name
% mal name
% clob type
% 71 length
function user.s15_1{autoCommit=true}():void;
X_4 := calc.bte(750:sht,2,0);
X_8 := sql.round(X_4,2,0,1:bte);
sql.exportValue(1,".","round_single_value","decimal",2,0,8,X_8,"");
end s15_1;
sql>select round(750,1);
MAPI = (monetdb) /tmp/.s.monetdb.50000
QUERY = select round(750,1);
ERROR = !too many digits (3 > 2)

Reproducible: Always

Steps to Reproduce:

  1. run sql query: select round(750,1);

Actual Results:

22003!too many digits (3 > 2)

Expected Results:

750

Comment 17225

Date: 2012-05-07 13:48:39 +0200
From: @njnes

fixed by adding another check for functions with decimals as input (when the input expressions are numbers)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant