-
Notifications
You must be signed in to change notification settings - Fork 13
Change value converters searching #204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
It would be nice to see some perf tests results here on simple and complex types |
@ArtDu please add a brief description of the changes -- what was changed, why this change is needed. |
src/main/java/io/tarantool/driver/api/MessagePackMapperBuilder.java
Outdated
Show resolved
Hide resolved
src/main/java/io/tarantool/driver/mappers/AbstractResultMapper.java
Outdated
Show resolved
Hide resolved
src/main/java/io/tarantool/driver/mappers/DefaultExtensionValueToUUIDConverter.java
Outdated
Show resolved
Hide resolved
src/main/java/io/tarantool/driver/mappers/DefaultBigIntegerValueToFloatConverter.java
Outdated
Show resolved
Hide resolved
c143ef0
to
eec2396
Compare
import io.tarantool.driver.mappers.converters.ObjectConverter; | ||
import io.tarantool.driver.mappers.converters.ValueConverter; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't mind leaving converters in the same folders to avoid breakin changes, but it seems better to separate converters and mappers, given that there are more than 50 files in one package
Should test perf of converting with TarantoolTuple and getting with targetType TarantoolTuple tuple = ...
tuple.getObject("fieldName", Integer.class) |
* The converters containing the implementing and ValueConverter and ObjectConveter are divided into separate classes for ease of use and in order to be able to register a valueConverter of this type ImmutableStringValueImpl -> String, and an objectConverter of this type String -> StringValue * In order for the names to be consistent, the names of the converter classes were changed * Additional package directories are added, because we had more than 50 files in the mappers directory and not all mappers, some converters.
Reflexive lookup for value converters has been replaced with accepting class implementations, since msgpack.unpacker gives them. Closes #178
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
However I highly recommend to do at least local testing of the new changes with SpringData before merging.
P.S. The new converters should go in a follow-up PR. The GH review interface is already completely broken at this number of changes +_+
Yeah, I tested snapshot with cartridge-springdata, we have to rewrite registration of |
valueConverter
of this typeImmutableStringValueImpl -> String
, and anobjectConverter
of this typeString
->StringValue
. More details in the code 😁Closes #178