shishkovilja commented on code in PR #12563:
URL: https://github.com/apache/ignite/pull/12563#discussion_r2609895850
##########
modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/IndexQueryResultMeta.java:
##########
@@ -64,27 +60,30 @@ public IndexQueryResultMeta(SortedIndexDefinition def, int
critSize) {
}
}
+ /** {@inheritDoc} */
+ @Override public short directType() {
+ return 18;
+ }
+
/** */
public IndexKeyTypeSettings keyTypeSettings() {
return keyTypeSettings;
}
/** */
- public LinkedHashMap<String, IndexKeyDefinition> keyDefinitions() {
- return keyDefs;
+ public void keyTypeSettings(IndexKeyTypeSettings keyTypeSettings) {
+ this.keyTypeSettings = keyTypeSettings;
}
- /** {@inheritDoc} */
- @Override public void writeExternal(ObjectOutput out) throws IOException {
- out.writeObject(keyTypeSettings);
-
- U.writeMap(out, keyDefs);
+ /** */
+ public Map<String, IndexKeyDefinition> keyDefinitions() {
+ return keyDefs;
}
- /** {@inheritDoc} */
- @Override public void readExternal(ObjectInput in) throws IOException,
ClassNotFoundException {
- keyTypeSettings = (IndexKeyTypeSettings)in.readObject();
-
- keyDefs = U.readLinkedMap(in);
+ /** */
+ public void keyDefinitions(Map<String, IndexKeyDefinition> keyDefs) {
+ this.keyDefs = keyDefs == null
Review Comment:
Unnecessary classcast and copying constructor. Setter is used with
conjunction of `MessageReader#readCollection`, so any insertion order is lost.
There can be possible bug, if we need this order.
--
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]