[ https://issues.apache.org/jira/browse/CASSANDRA-10365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14979182#comment-14979182 ]
Robert Stupp commented on CASSANDRA-10365: ------------------------------------------ Pushed a commit that adds initcond literal to schema table [here|https://github.com/snazy/cassandra/tree/10365-uda-3.0]. Specifically the patch does: * add {{initcond_literal}} column to {{system_schema.aggregates}}, which contains the literal from the _CREATE AGGREGATE_ statement * add {{initcond_version}} column to {{system_schema.aggregates}}, which contains the native protocol version used to serialize {{initcond}} value (to be able to read it in future versions) * add {{"tuple"}} case to {{CqlTypeParser}} (to get {{AggregationTest}} working) Unfortunately we cannot reliably re-construct the CQL literal for a number of reasons: * there are no {{TypeSerializer}} implementations for tuples/UDTs * AbstractTextSerializer.getString() returns the non-quoted string * TupleType/UserType return BytesSerializer - this means that nested type combinations cannot be reliably stringified (would return a hex representation instead of CQL tuple/UDT literals) WRT this ticket - although it is not nice to not have the INITCOND literal in a _describeAggregate_ method for pre-3.0 UDAs, I *think* it's ok, since UDFs and UDAs were experimental in 2.2 and it only affects a _describeAggregate_ method, if the driver is not "smart enough" to reconstruct the literal itself from {{initcond}}. So - for pre-3.0 UDAs such a _describeAggregate_ would not work perfectly and might return some hint if {{initcond_literal}} column is {{null}}. I'm not sure whether it's worth to fix the AbstractType/TypeSerializer getString/toString functionality (for 3.0) since it's a 'bit' more code to change. > Consider storing types by their CQL names in schema tables instead of > fully-qualified internal class names > ---------------------------------------------------------------------------------------------------------- > > Key: CASSANDRA-10365 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10365 > Project: Cassandra > Issue Type: Improvement > Reporter: Aleksey Yeschenko > Assignee: Aleksey Yeschenko > Labels: client-impacting > Fix For: 3.0.0 > > > Consider saving CQL types names for column, UDF/UDA arguments and return > types, and UDT components. -- This message was sent by Atlassian JIRA (v6.3.4#6332)