This patch ensures type_parser can handle user defined types. It also
prefixes user_type_impl::make_name() with
org.apache.cassandra.db.marshal.UserType.
Fixes#631
Signed-off-by: Duarte Nunes <duarte@scylladb.com>
According to the comments, we are doing this for simplicity, to avoid
creating a new type_parse object.
However, while this approach works well for the simple case where we expect
a single token, it won't work as the parser becomes more able to recognize
other cases.
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Note that the multicell attribute can't be part of the parse instance, because
otherwise we would either freeze every subsequent element, or complicate the
flow considerably to handle it.
It is instead, passed as a parameter to get_instance_types(), which will then
have to be propagated to parse() and get_abstract_type()
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
We currently have a bug when parsing collection types that contains collections
themselves.
We call the recursion correctly, but get_abstract_type gets its value by copy, not
reference. Therefore, all work it does in the _idx manipulation is done in the copy,
and when the callee returns, the caller, with its _idx unchanged, will try recursing
again.
Fix it by passing by reference
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Collections can at times have the form <hex>:type. This is the case,
for instance, for the strings that compose the comparator string. The
actual hex number isn't terribly interesting: it is used as a key to
hash the collection types, but since we hash them by their types anyway,
we can safely ignore them.
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>