Files
scylladb/db
Avi Kivity a7520c0ba9 Merge "Turn cql3_type into a trivial wrapper over data_type" from Rafael
"
Both cql3_type and abstract_type are normally used inside
shared_ptr. This creates a problem when an abstract_type needs to refer
to a cql3_type as that creates a cycle.

To avoid warnings from asan, we were using a std::unordered_map to
store one of the edges of the cycle. This avoids the warning, but
wastes even more memory.

Even before this series cql3_type was a fairly light weight
structure. This patch pushes in that direction and now cql3_type is a
struct with a single member variable, a data_type.

This avoids the reference cycle and is easier to understand IMHO.

The one corner case is varchar. In the old system cql3_type::varchar
and cql3_type::text don't compare equal, but they both map to the same
data_type.

In the new system they would compare equal, so we avoid the confusion
by just removing the cql3_type::varchar variable.

Tests: unit (dev)
"

* 'espindola/merge-cq3-type-and-type-v3' of https://github.com/espindola/scylla:
  Turn cql3_type into a trivial wrapper over data_type
  Delete cql3_type::varchar
  Simplify db::cql_type_parser::parse
  Add a test for the varchar column representation
2019-03-25 15:03:16 +02:00
..
2019-03-12 13:19:04 -07:00
2018-11-21 00:01:44 +02:00