LucidDB / luciddb

DEFUNCT: See README
https://github.com/LucidDB/luciddb
Apache License 2.0
52 stars 24 forks source link

[FRG-77] Incorrect Type Derivation for String Functions #793

Closed dynamobi-build closed 12 years ago

dynamobi-build commented 12 years ago

[reporter="jvs", created="Fri, 17 Mar 2006 15:04:39 -0500 (GMT-05:00)"] The following operators do not derive types correctly.

TRIM
OVERLAY
|| (concat)

In SqlValidatorTest,

trim('mustache' from 'beard') returns CHAR(5), but it should return VARCHAR(5);
see SQL99 Part 2 Section 6.18 Syntax Rule 9.c.

overlay('ABCdef' placing 'abc' from 1 for 3) returns CHAR(9) but it should
return VARCHAR(9); ibid, Syntax Rule 10.c and 4.a

'a'||'b' returns VARCHAR(2) but should return CHAR(2); see SQL99 Part 2 Section
6.27 Syntax Rule 3.a.ii

I didn't check all the other functions, but the pattern here makes me think you
might want to cross-check the standard.
------- Comment #1 From John Sichi 2005-01-26 03:04 [reply] -------
forgot to set priority/severity

------- Comment #2 From Stephan Zuercher 2005-06-01 08:49 [reply] -------
Reassign from Wael to component owner.

------- Comment #3 From John Sichi 2005-10-11 16:16 [reply] -------
These are fixed by eigenchange 4220. However, I didn't add tests, so I'm
leaving the bug open for now.

dynamobi-build commented 12 years ago

[author="jhyde", created="Mon, 19 Jun 2006 02:44:25 -0500 (GMT-05:00)"] Jack, You have a bug (dt315) to enable type-checking. Can you fix this one at the same time.

dynamobi-build commented 12 years ago

[author="angel", created="Fri, 21 Jul 2006 07:15:42 -0500 (GMT-05:00)"] Test case added in dt eigenchange 7212