You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sylvain Lebresne (JIRA)" <ji...@apache.org> on 2014/12/08 20:49:13 UTC

[jira] [Resolved] (CASSANDRA-8439) Consider using a symbol that won't have to be escaped around UDF's body

     [ https://issues.apache.org/jira/browse/CASSANDRA-8439?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sylvain Lebresne resolved CASSANDRA-8439.
-----------------------------------------
    Resolution: Not a Problem

> Consider using a symbol that won't have to be escaped around UDF's body
> -----------------------------------------------------------------------
>
>                 Key: CASSANDRA-8439
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8439
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Michaël Figuière
>
> Right now the CQL grammar defines the UDF's body as a {{STRING_LITERAL}}. I understand that this is convenient in the grammar and avoid creating a special type just for these bodies. But the problem is that a quote is a fairly common symbol in the programming languages that will be used inside this body, which means that the developer will need to escape all these quotes in the UDF's body. That will be fairly annoying, not quite readable and tedious to maintain (à la backslash in Java Regexes...).
> Could we consider using curly braces or parentheses as delimiters? Though, I don't realize how hard it would be to use such asymmetric delimiters in the ANTLR grammar while still allowing them to be used within the body of the UDF.
> Another symmetric delimiter could be considered instead otherwise.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)