LucidDB / luciddb

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

[FRG-18] unable to insert and select null decimal from table #852

Closed dynamobi-build closed 12 years ago

dynamobi-build commented 12 years ago

[reporter="jpham", created="Tue, 10 Jan 2006 16:18:20 -0500 (GMT-05:00)"] I'm not sure who this goes to (hopefully not me! ;)
I created a table with two decimal columns.
After I've inserted data, I can select each column
by itself, but not both at the same time.

I've noticed that this sequence works for tables with doubles or longs,
and decimal tables work with non-null data.

===

0: jdbc:farrago:> create table s.twodec (c decimal(3,2) primary key, d decimal(3,0));
No rows affected (0.699 seconds)
0: jdbc:farrago:> insert into s.twodec values(1, null);
1 row affected (2.356 seconds)
0: jdbc:farrago:> select c from s.twodec;
+-------+
| C |
+-------+
| 1.00 |
+-------+
1 row selected (0.855 seconds)
0: jdbc:farrago:> select d from s.twodec;
+----+
| D |
+----+
| |
+----+
1 row selected (0.836 seconds)
0: jdbc:farrago:> select * from s.twodec;
+----+-----+
| C | D |
+----+-----+
| | -1 |
+----+-----+
1 row selected (0.586 seconds)

dynamobi-build commented 12 years ago

[author="jpham", created="Fri, 13 Jan 2006 18:55:33 -0500 (GMT-05:00)"] Can't make EncodedSqlDecimal implement NullableValue
unless its type really is nullable.