Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A3EE218139 for ; Mon, 7 Dec 2015 16:51:11 +0000 (UTC) Received: (qmail 96748 invoked by uid 500); 7 Dec 2015 16:51:11 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 96336 invoked by uid 500); 7 Dec 2015 16:51:11 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 96190 invoked by uid 99); 7 Dec 2015 16:51:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Dec 2015 16:51:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id F0DEC2C1F5A for ; Mon, 7 Dec 2015 16:51:10 +0000 (UTC) Date: Mon, 7 Dec 2015 16:51:10 +0000 (UTC) From: "Michael Penick (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CASSANDRA-10826) frozen<> added to non-frozen UDF/UDA argument types in schema metadata MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Michael Penick created CASSANDRA-10826: ------------------------------------------ Summary: frozen<> added to non-frozen UDF/UDA argument types in schema metadata Key: CASSANDRA-10826 URL: https://issues.apache.org/jira/browse/CASSANDRA-10826 Project: Cassandra Issue Type: Bug Reporter: Michael Penick The function "avg_state" is created with a non-frozen tuple argument {{state}} and return type. It should be non-frozen because it's modified by the code in the body of the UDF. {code} CREATE KEYSPACE examples WITH replication = { 'class': 'SimpleStrategy', 'replication_factor': '3' }; CREATE FUNCTION examples.avg_state(state tuple, val int) CALLED ON NULL INPUT RETURNS tuple LANGUAGE java AS 'if (val != null) { state.setInt(0, state.getInt(0) + 1); state.setLong(1, state.getLong(1) + val.intValue()); } return state;' {code} However, the schema metadata has the both the {{state}} argument and the return type incorrectly defined as {{frozen<>}}: {code} cqlsh> SELECT argument_types, return_type FROM system_schema.functions WHERE keyspace_name = 'examples' AND function_name = 'avg_state'; argument_types | return_type ---------------------------------------+---------------------------- ['frozen>', 'int'] | frozen> {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)