adelapena commented on code in PR #2957:
URL: https://github.com/apache/cassandra/pull/2957#discussion_r1417485261


##########
pylib/cqlshlib/copyutil.py:
##########
@@ -2130,6 +2136,7 @@ def convert_unknown(val, ct=cql_type):
             'map': convert_map,
             'tuple': convert_tuple,
             'frozen': convert_single_subtype,
+            VectorType.typename: convert_vector,

Review Comment:
   I don't really understand the purpose of having `UserType` and 
`ReversedType` in the `convert_unknown` function. It seems that all the driver 
types have had a well known `typename` for a very long time. So we could use 
the `VectorType.typename: convert_vector` pattern for all data types:
   ```python
   def convert_unknown(val, ct=cql_type):
       printdebugmsg("Unknown type %s (%s) for val %s" % (ct, ct.typename, val))
       return val
   
   converters = {
       BytesType.type_name: convert_blob,
       DecimalType.type_name: get_convert_decimal_fcn(adapter=Decimal),
       UUIDType.type_name: convert_uuid,
       BooleanType.type_name: convert_bool,
   ```
   I'm fine with doing that either here or in a separate patch.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to