lowka commented on code in PR #3187:
URL: https://github.com/apache/ignite-3/pull/3187#discussion_r1492530647
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/mapping/MappedFragment.java:
##########
@@ -66,10 +71,30 @@ public class MappedFragment {
this.target = target;
}
+ /** Constructor. */
+ private MappedFragment(
+ Fragment fragment,
+ List<ColocationGroup> groups, List<String> nodes,
+ Long2ObjectMap<ColocationGroup> groupsBySourceId,
+ @Nullable Long2ObjectMap<List<String>> sourcesByExchangeId,
+ @Nullable ColocationGroup target
+ ) {
+ this.fragment = fragment;
+ this.nodes = List.copyOf(nodes);
+ this.groupsBySourceId = groupsBySourceId;
+ this.sourcesByExchangeId = sourcesByExchangeId;
Review Comment:
I think we should find a better name for `sourcesByExchangeId ` fields.
Because it is not obvious that it stores node name (yes, it stores string which
sorta-kinda looks like node names), sure having a `private final List<String>
nodes` helps but still.
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/mapping/MappedFragment.java:
##########
@@ -66,10 +71,30 @@ public class MappedFragment {
this.target = target;
}
+ /** Constructor. */
+ private MappedFragment(
+ Fragment fragment,
+ List<ColocationGroup> groups, List<String> nodes,
+ Long2ObjectMap<ColocationGroup> groupsBySourceId,
+ @Nullable Long2ObjectMap<List<String>> sourcesByExchangeId,
+ @Nullable ColocationGroup target
+ ) {
+ this.fragment = fragment;
+ this.nodes = List.copyOf(nodes);
+ this.groupsBySourceId = groupsBySourceId;
+ this.sourcesByExchangeId = sourcesByExchangeId;
Review Comment:
I think we should find a better name for `sourcesByExchangeId ` field.
Because it is not obvious that it stores node name (yes, it stores string which
sorta-kinda looks like node names), sure having a `private final List<String>
nodes` helps but still.
--
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]