mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-29 19:21:01 +00:00
Right now to get user types the method in question gets global proxy instance to get database from it and then peek a keyspace, its metadata and, finally, the user types. There's also a safety check for proxy not being initialized, which happens in tests. Instead of messing with the proxy, the parse() method now accepts the user_types_storage reference from which it gets the types. All the callers already have the needed storage at hand -- in most of the cases it's one shared between the database and schema_ctxt. In case of tests is's a dummy storage, in case of schema-loader it's its local one. The get_column_mapping() is special -- it doesn't expect any user-types to be parsed and passes "" keyspace into it, neither it has db/ctxt to get types storage from, so it can safely use the dummy one. Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>