Um, I’m not entirely sure how I misread it, since this was copy-pasted from the 
document:
  UPDATE atable SET col = some_function(?) …;

So the document examples certainly seem to support the use of UDF in UPDATE.  I 
suppose the document may be more erroneous in its writing than I in its 
misreading.

Additionally, this statement works in cqlsh (presuming max_int() is a UDF):
  UPDATE test_table SET data=max_int(3,4) WHERE idx='abc’;

So, if the grammar is not supposed to allow this, then there is a bug somewhere 
because in 3.3 it certainly seems to be parsed and executed without complaint.

—Kim


From: DuyHai Doan <doanduy...@gmail.com<mailto:doanduy...@gmail.com>>
Reply-To: "user@cassandra.apache.org<mailto:user@cassandra.apache.org>" 
<user@cassandra.apache.org<mailto:user@cassandra.apache.org>>
Date: Thursday, March 10, 2016 at 13:21
To: "user@cassandra.apache.org<mailto:user@cassandra.apache.org>" 
<user@cassandra.apache.org<mailto:user@cassandra.apache.org>>
Subject: Re: Using User Defined Functions in UPDATE queries


You have misread the CQL doc given in the link. According to CQL update grammar 
it's not possible to use UDF. I see UDF only allowed in select clause...

Reply via email to