You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sn...@apache.org on 2015/05/27 17:57:13 UTC

[2/4] cassandra git commit: Example UDFs don't work

Example UDFs don't work

patch by Christopher Batey; reviewed by Robert Stupp for CASSANDRA-9480


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/86014122
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/86014122
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/86014122

Branch: refs/heads/trunk
Commit: 860141229ab3291675d9b632e34ab4405359316b
Parents: 162489a
Author: Christopher Batey <ch...@gmail.com>
Authored: Wed May 27 17:55:14 2015 +0200
Committer: Robert Stupp <sn...@snazy.de>
Committed: Wed May 27 17:55:14 2015 +0200

----------------------------------------------------------------------
 doc/cql3/CQL.textile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/86014122/doc/cql3/CQL.textile
----------------------------------------------------------------------
diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile
index 2463a01..91d8dd8 100644
--- a/doc/cql3/CQL.textile
+++ b/doc/cql3/CQL.textile
@@ -1422,6 +1422,7 @@ Note that you can use the double-quoted string syntax to enclose the UDF source
 
 bc(sample).. 
 CREATE FUNCTION some_function ( arg int )
+  RETURNS NULL ON NULL INPUT
   RETURNS int
   LANGUAGE java
   AS $$ return arg; $$;
@@ -1432,7 +1433,8 @@ p.
 
 bc(sample). 
 CREATE TYPE custom_type (txt text, i int);
-CREATE FUNCTION fct_using_udt ( udtarg frozen<customType> )
+CREATE FUNCTION fct_using_udt ( udtarg frozen<custom_type> )
+  RETURNS NULL ON NULL INPUT
   RETURNS text
   LANGUAGE java
   AS $$ return udtarg.getString("txt"); $$;
@@ -1484,7 +1486,7 @@ CREATE AGGREGATE average ( int )
   FINALFUNC averageFinal
   INITCOND (0, 0);
 
-CREATE TYPE atable (
+CREATE TABLE atable (
   pk int PRIMARY KEY,
   val int);
 INSERT INTO atable (pk, val) VALUES (1,1);