How can we pass a constant value in Cassandra "User Defined Function" ? Signature of my UDF:
CREATE OR REPLACE FUNCTION spatial_keyspace.state_group_and_max( state map<text, int>, type text, pkey int, level int)
CQL query:
select spatial_keyspace.group_and_count(quadkey, pkey, 5) from spatial_keyspace.businesspoints where longitude >= -179.98333 and longitude <=86 and latitude >= -179.98333 and latitude <= 86 LIMIT 10 ALLOW FILTERING;
I am using Cassandra 3.5.
Lucky you! I already wanted this feature so a JIRA ticket has been created and actually the patch is also available. Now just cross fingers and hope that it will be merged and ready for Cassandra 3.6 release. You can as well go there and vote for this JIRA and drop a comment to ask the Cassandra core team to review it and merge it.