korlov42 commented on code in PR #1831:
URL: https://github.com/apache/ignite-3/pull/1831#discussion_r1147532279
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/api/SessionImpl.java:
##########
@@ -149,7 +151,13 @@ public int defaultPageSize() {
/** {@inheritDoc} */
@Override
public SessionBuilder toBuilder() {
- return new SessionBuilderImpl(qryProc, new HashMap<>(props.toMap()))
+ Map<String, Object> propertyMap = new HashMap<>();
+
+ for (Map.Entry<Property<?>, Object> entry : props) {
+ propertyMap.put(entry.getKey().name, entry.getValue());
+ }
+
+ return new SessionBuilderImpl(qryProc, propertyMap)
Review Comment:
> It is not clean if toMap() return a copy of properties, or just adapter or
internal map.
that's why I deleted `toMap()` in this patch =) Please take a look at the
PropertiesHolder interface: now It has `get` and `getOrDefault` methods only.
Also it extends Iterable to make it possible to iterate over a whole number of
property-value pairs
--
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]