code: public Object castToType(SessionInterface session, Object a, Type type) {
          return convertToType(session, a, type);
      }
docs: Explicit casts are handled by this method.
  SQL standard 6.12 rules for enforcement of size, precision and scale
  are implemented. For CHARACTER values, it performs truncation in all
  cases of long strings.