jameshartig commented on PR #1855:
URL: 
https://github.com/apache/cassandra-gocql-driver/pull/1855#issuecomment-2774592014

   @joao-r-reis I refactored a lot of the code and even though I'm not done, 
I'm interested in your thoughts.
   
   * A new public `RegisteredTypes` struct which holds types and could be 
passed to a config. I don't like that the global one is overwritable so I might 
change it to `GlobalTypes() *RegisteredTypes`. I think I also need to expose 
methods for getting a type to make it easier for custom types to reuse some 
existing types for marshalling/unmarshalling.
   * `SimpleCQLType` can wrap a `TypeInfo` if you don't need custom parsing.
   * Marshal/Unmarshal were moved off of `CQLType` and instead put on 
`TypeInfo`. This simplifies the protocol version handling and I added an 
explicit `unsupportedUDTTypeInfo`.
   * I added explicit handling of Custom and removed the Marshal/Unmarshal 
panic, that said, I'm still trying to figure out how to handle unknown custom 
types. When we parse metadata we need to be able to make `TypeInfo`s for custom 
types that we don't necessarily know how to marshal/unmarshal so I might need 
to add some fallback `unknownCustomTypeInfo` type that still panics/errors in 
Marshal/Unmarshal.
   * `Session` now has a `types` field on it. Not pulling it in yet from 
config. Still need to figure out the best way to "merge" the global one with 
the session ones. Now passing session along throughout the framer and metadata 
parsing.
   * Removed the `NativeType` type but left `NewNativeType` which does 
something similar to before since there was a decent amount of usage in other 
repos.
   
   Overall these changes also significantly improved the benchmarks compared to 
the last patch and most unmarshal benchmarks are within single-digit 
percentages now to trunk.


-- 
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: pr-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to