Details
-
Bug
-
Status: Resolved
-
Low
-
Resolution: Fixed
-
None
-
None
-
Low
Description
Given the following test data:
cqlsh:test> create table foo(k int, v int, primary key(k,v)); cqlsh:test> insert into foo(k,v) values(1,1); cqlsh:test> insert into foo(k,v) values(1,2); cqlsh:test> insert into foo(k,v) values(1,3);
And the following aggregate definition:
cqlsh:test> CREATE FUNCTION cat(s text, v int) RETURNS NULL ON NULL INPUT RETURNS text LANGUAGE java AS 'return s + v;'; cqlsh:test> CREATE AGGREGATE cats(int) SFUNC cat STYPE text INITCOND '';
The following should return '123', but it returns null:
cqlsh:test> select cats(v) from foo where k = 1; test.cats(v) ---------------
The empty INITCOND is treated as null, and the SFUNC is never called.
Attachments
Attachments
Issue Links
- links to