[
https://issues.apache.org/jira/browse/CASSANDRA-13267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15885531#comment-15885531
]
Sylvain Lebresne commented on CASSANDRA-13267:
----------------------------------------------
Not a proper review, but from a quick scanning, I don't think it's a good idea
for {{toString()}} to rely on the value of the java {{toString()}} method of
the java object the deserializer return. In particular, this isn't necessary
(and won't be in a number of case) a valid CQL string representation (and is in
fact a fairly useless representation in the case of ByteTypes), and so makes
for a weird CQL function.
Also:
* I find it bothering that we'd start adding more special cases to
{{Selectable}} like this. If we're having more than one method taking arbitrary
types, we should devise a slightly more elegant way to support it.
* We'd want an error message like for {{toJson}} in {{FunctionResolver}} for
user friendliness.
* Some unit tests wouldn't hurt.
> Add new CQL functions
> ---------------------
>
> Key: CASSANDRA-13267
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13267
> Project: Cassandra
> Issue Type: Improvement
> Components: CQL
> Reporter: vincent royer
> Priority: Trivial
> Labels: features
> Fix For: 3.0.x
>
> Attachments: 0001-CASSANDRA-13267-Add-CQL-functions.patch
>
>
> Introduce 2 new CQL functions :
> -toString(x) converts a column to its string representation.
> -toJsonArray(x, y, z...) generates a JSON array of JSON string.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)