LucidDB / luciddb

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

[FRG-87] cast(x as int) doesn't work #783

Closed dynamobi-build closed 12 years ago

dynamobi-build commented 12 years ago

[reporter="jvs", created="Wed, 22 Mar 2006 12:36:07 -0500 (GMT-05:00)"] Instead, you have to use cast(x as integer). The reason is that SqlDataType.deriveType relies on SqlTypeName for the list of supported types, which is wrong. It should be relying on the catalog, same as CREATE TABLE. The code we need is in DdlValidator.findSqlDataType. Obviously, SqlDataType can't call to this Farrago code; it will need to call indirectly via a virtual method in SqlValidator instead. However, DdlValidator won't be available while validating a non-DDL statement. So we need to share the lookup method with FarragoPreparingStmt. (As a matter of fact, a bunch of stuff should be shared between DdlValidator and FarragoPreparingStmt, so now might be a good time to set that up.)

dynamobi-build commented 12 years ago

[author="jvs", created="Wed, 19 Nov 2008 05:24:36 -0500 (GMT-05:00)"] This got fixed long ago.