LucidDB / luciddb

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

[FRG-51] Cast -9223372036854775808 as string using java calc fails #819

Closed dynamobi-build closed 12 years ago

dynamobi-build commented 12 years ago

[reporter="angel", created="Mon, 20 Feb 2006 18:13:11 -0500 (GMT-05:00)"] Casting the minimum long, -9223372036854775808, to a string using the Java Calc fails, it is okay using the Fennel Calc.

Using the Java Calc (bad):
0: jdbc:farrago:> alter system set "calcVirtualMachine" = 'CALCVM_JAVA';
No rows affected (0.121 seconds)
0: jdbc:farrago:> values cast (-9223372036854775808 as varchar(30));
+-----------------------+
|EXPR$0 |
+-----------------------+
| -'..--).0-*(+,))+(0( |
+-----------------------+
1 row selected (0.757 seconds)

Using the Fennel Calc (okay):
0: jdbc:farrago:> alter system set "calcVirtualMachine" = 'CALCVM_FENNEL';
No rows affected (0.044 seconds)
0: jdbc:farrago:> values cast (-9223372036854775808 as varchar(30));
+-----------------------+
|EXPR$0 |
+-----------------------+
| -9223372036854775808 |
+-----------------------+
1 row selected (0.862 seconds)

dynamobi-build commented 12 years ago

[author="xluo", created="Tue, 21 Feb 2006 23:06:00 -0500 (GMT-05:00)"] -Long.MIN_VALUE happens to be the same as Long.MIN_VALUE.