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 752F2187E1 for ; Fri, 20 Nov 2015 01:26:11 +0000 (UTC) Received: (qmail 14333 invoked by uid 500); 20 Nov 2015 01:26:11 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 14279 invoked by uid 500); 20 Nov 2015 01:26: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 13874 invoked by uid 99); 20 Nov 2015 01:26:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Nov 2015 01:26:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 03B922C1F6A for ; Fri, 20 Nov 2015 01:26:11 +0000 (UTC) Date: Fri, 20 Nov 2015 01:26:11 +0000 (UTC) From: "dan jatnieks (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CASSANDRA-10741) Unable to create a function with argument of type Inet MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 dan jatnieks created CASSANDRA-10741: ---------------------------------------- Summary: Unable to create a function with argument of type Inet Key: CASSANDRA-10741 URL: https://issues.apache.org/jira/browse/CASSANDRA-10741 Project: Cassandra Issue Type: Bug Components: CQL Reporter: dan jatnieks We are unable to create a function with an argument of type {{inet}} using 3.0. This works in 2.2, but fails in 3.0 {noformat} CREATE OR REPLACE FUNCTION test.f2 (p1 inet) CALLED ON NULL INPUT RETURNS int LANGUAGE java AS 'return 2;'; {noformat} >From cqlsh: {noformat} 05:14 PM:~/projects/cassandra-3.0$ ./bin/cqlsh Connected to Test Cluster at 127.0.0.1:9042. [cqlsh 5.0.1 | Cassandra 3.0.0-SNAPSHOT | CQL spec 3.3.1 | Native protocol v4] Use HELP for help. cqlsh> CREATE OR REPLACE FUNCTION test.f2 (p1 inet) ... CALLED ON NULL INPUT RETURNS int LANGUAGE java AS 'return 2;'; InvalidRequest: code=2200 [Invalid query] message="Could not compile function 'test.f2' from Java source: org.apache.cassandra.exceptions.InvalidRequestException: Java source compilation failed: GENERATED SOURCE ERROR: line 20 (in generated source): java.net.InetAddress cannot be resolved to a type GENERATED SOURCE ERROR: line 25 (in generated source): java.net.InetAddress cannot be resolved to a type generated source: package org.apache.cassandra.cql3.udf.gen.ptest2ef2_4746343_7; import java.nio.ByteBuffer; import java.util.List; import org.apache.cassandra.cql3.functions.JavaUDF; import com.datastax.driver.core.DataType; public final class Ctest2ef2_12216880_8 extends JavaUDF { public Ctest2ef2_12216880_8(DataType returnDataType, DataType[] argDataTypes) { super(returnDataType, argDataTypes); } protected ByteBuffer executeImpl(int protocolVersion, List params) { Integer result = xtest2ef2_16165915_9( (java.net.InetAddress) super.compose(protocolVersion, 0, params.get(0)) ); return super.decompose(protocolVersion, result); } private Integer xtest2ef2_16165915_9(java.net.InetAddress p1) { return 2; } } " {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)