-
Notifications
You must be signed in to change notification settings - Fork 200
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
Bugfix/fix array accessor in tuple #1248
Bugfix/fix array accessor in tuple #1248
Conversation
e051c86
to
966fd7d
Compare
Hi @vietj , could you pls approve to run CI test |
Ah, actually some integration test fails related to |
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.
Thank you @zero88 , a first round of comments
for (Object o : array) { | ||
list.add(o); | ||
} | ||
List<Object> list = new ArrayList<>(array.length); |
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.
This does not bring anything, please revert it.
966fd7d
to
e1d32eb
Compare
After reviewing Then, I propose Could you have a quick look before I fix the integration test? @vietj @tsegismont |
e1d32eb
to
c3ea243
Compare
} else { | ||
return (Short) val; // Throw CCE | ||
} | ||
return ChainConverter.allowCast(Short.class) |
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.
this seems to not be GC free
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.
Could you pls give more hint? I have not yet understood
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.
ChainConverter is a short live object, that should deactivate and no reference after the method is terminated.
So, I thought it is not a big deal
we should avoid using primitive arrays when tuple are constructed instead of trying to deal with them. |
Hi @vietj The first one is a primitive array Actually, I can do Tuple t = Tuple.of(new int[]{1, 2, 3})
t.getArrayOfIntegers(0) But actually, no "reality" use case for this on SQL. The prepared parameters can be array, but most SQL client (e.g JDBC) uses an Object array instead of a primitive array. So, I agree about
|
The second one is vert-x3/vertx-jdbc-client#290 For example:
|
Motivation:
Fix vert-x3/vertx-jdbc-client#290
Fix #1247