LucidDB / luciddb

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

[FRG-27] It would be nice if RexProgramBuilder considered data type in making keys #843

Open dynamobi-build opened 12 years ago

dynamobi-build commented 12 years ago

[reporter="jpham", created="Mon, 23 Jan 2006 19:04:04 -0500 (GMT-05:00)"] For example

values 10<=10.0;
Error: MUL(s8,s4,s4) is not a registered instruction (at line:col 0:0 to 7:36, characters 0 to 131) (state=,code=0)

The original statement is expanded to:
<=(*(10, 10), Reinterpret(10.0))

Where the first "10" is the literal from the statement.
The second "10" is the literal generated by ReduceDecimalsRule.
It wants to be a BIGINT literal, but is identified as an INTEGER
literal because it has the same textual representation as the first.

For integration, I am putting in a quick fix into RexProgramBuilder.registerInternal()
If it is not acceptable, I can take out the fix and add casts everywhere.