[jira] [Commented] (SOLR-17623) SimpleOrderedMap should implement Map
[ https://issues.apache.org/jira/browse/SOLR-17623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17933690#comment-17933690 ] ASF subversion and git services commented on SOLR-17623: Commit 046677d10b384dd399da53b89d19ab457ab5e6b1 in solr's branch refs/heads/deprecations from David Smiley [ https://gitbox.apache.org/repos/asf?p=solr.git;h=046677d10b3 ] SOLR-17623: SimpleOrderedMap equals, hashCode (and for Map.Entry) (#3214) And ensure a NamedList is never equal to a SimpleOrderedMap > SimpleOrderedMap should implement Map > - > > Key: SOLR-17623 > URL: https://issues.apache.org/jira/browse/SOLR-17623 > Project: Solr > Issue Type: Improvement >Reporter: David Smiley >Priority: Major > Labels: newdev, pull-request-available > Fix For: 9.9 > > Time Spent: 3h 40m > Remaining Estimate: 0h > > SimpleOrderedMap is semantically a Map; it should implement Map. > Why: This will help us transition away from NamedList (it's superclass) in a > number of places, since many (most?) places that are defined to return a > NamedList could actually be declared to be a SimpleOrderedMap and eventually > simply Map. > There's some risk that code somewhere gets this Map, a large one, and then > assumes it has better than O(N) lookup, which it doesn't provide. Perhaps a > Javadoc warning will do. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org
[jira] [Commented] (SOLR-17623) SimpleOrderedMap should implement Map
[ https://issues.apache.org/jira/browse/SOLR-17623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17931879#comment-17931879 ] ASF subversion and git services commented on SOLR-17623: Commit 9138a1f731d12602b8e57c13bf65614f8bfa9297 in solr's branch refs/heads/branch_9x from David Smiley [ https://gitbox.apache.org/repos/asf?p=solr.git;h=9138a1f731d ] SOLR-17623: SimpleOrderedMap equals, hashCode (and for Map.Entry) (#3214) And ensure a NamedList is never equal to a SimpleOrderedMap (cherry picked from commit 046677d10b384dd399da53b89d19ab457ab5e6b1) > SimpleOrderedMap should implement Map > - > > Key: SOLR-17623 > URL: https://issues.apache.org/jira/browse/SOLR-17623 > Project: Solr > Issue Type: Improvement >Reporter: David Smiley >Priority: Major > Labels: newdev, pull-request-available > Fix For: 9.9 > > Time Spent: 3h 40m > Remaining Estimate: 0h > > SimpleOrderedMap is semantically a Map; it should implement Map. > Why: This will help us transition away from NamedList (it's superclass) in a > number of places, since many (most?) places that are defined to return a > NamedList could actually be declared to be a SimpleOrderedMap and eventually > simply Map. > There's some risk that code somewhere gets this Map, a large one, and then > assumes it has better than O(N) lookup, which it doesn't provide. Perhaps a > Javadoc warning will do. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org
[jira] [Commented] (SOLR-17623) SimpleOrderedMap should implement Map
[ https://issues.apache.org/jira/browse/SOLR-17623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17931873#comment-17931873 ] ASF subversion and git services commented on SOLR-17623: Commit 046677d10b384dd399da53b89d19ab457ab5e6b1 in solr's branch refs/heads/main from David Smiley [ https://gitbox.apache.org/repos/asf?p=solr.git;h=046677d10b3 ] SOLR-17623: SimpleOrderedMap equals, hashCode (and for Map.Entry) (#3214) And ensure a NamedList is never equal to a SimpleOrderedMap > SimpleOrderedMap should implement Map > - > > Key: SOLR-17623 > URL: https://issues.apache.org/jira/browse/SOLR-17623 > Project: Solr > Issue Type: Improvement >Reporter: David Smiley >Priority: Major > Labels: newdev, pull-request-available > Fix For: 9.9 > > Time Spent: 3h 40m > Remaining Estimate: 0h > > SimpleOrderedMap is semantically a Map; it should implement Map. > Why: This will help us transition away from NamedList (it's superclass) in a > number of places, since many (most?) places that are defined to return a > NamedList could actually be declared to be a SimpleOrderedMap and eventually > simply Map. > There's some risk that code somewhere gets this Map, a large one, and then > assumes it has better than O(N) lookup, which it doesn't provide. Perhaps a > Javadoc warning will do. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org
[jira] [Commented] (SOLR-17623) SimpleOrderedMap should implement Map
[ https://issues.apache.org/jira/browse/SOLR-17623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17922943#comment-17922943 ] David Smiley commented on SOLR-17623: - Lets take that topic to SOLR-17647 which I just created... > SimpleOrderedMap should implement Map > - > > Key: SOLR-17623 > URL: https://issues.apache.org/jira/browse/SOLR-17623 > Project: Solr > Issue Type: Improvement >Reporter: David Smiley >Priority: Major > Labels: newdev, pull-request-available > Fix For: 9.9 > > Time Spent: 3h 10m > Remaining Estimate: 0h > > SimpleOrderedMap is semantically a Map; it should implement Map. > Why: This will help us transition away from NamedList (it's superclass) in a > number of places, since many (most?) places that are defined to return a > NamedList could actually be declared to be a SimpleOrderedMap and eventually > simply Map. > There's some risk that code somewhere gets this Map, a large one, and then > assumes it has better than O(N) lookup, which it doesn't provide. Perhaps a > Javadoc warning will do. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org
[jira] [Commented] (SOLR-17623) SimpleOrderedMap should implement Map
[ https://issues.apache.org/jira/browse/SOLR-17623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17922921#comment-17922921 ] Renato Haeberli commented on SOLR-17623: You're welcome, I couldn't have done it without your help! Just to make sure, I do understand the challenges around moving away from NamedList.asShallowMap correctly: NamedList.asShallowMap calls NamedList.this.asMap(1), hence NamedLists within a NamedList are also converted to a Map. By simply using SOM wherever asShallowMap is called, we would 'lose' this conversion of the nested NamedList. Could we overcome that issue by ensuring, that wherever asShallowMap is called, we change the code so that the SOM only holds other SOMs, and no NamedList? With that, the nested data structure is already a Map by definition and should not cause any issues. Is the goal to also to move away from NamedList.asMap or only from asShallowMap? > SimpleOrderedMap should implement Map > - > > Key: SOLR-17623 > URL: https://issues.apache.org/jira/browse/SOLR-17623 > Project: Solr > Issue Type: Improvement >Reporter: David Smiley >Priority: Major > Labels: newdev, pull-request-available > Fix For: 9.9 > > Time Spent: 3h 10m > Remaining Estimate: 0h > > SimpleOrderedMap is semantically a Map; it should implement Map. > Why: This will help us transition away from NamedList (it's superclass) in a > number of places, since many (most?) places that are defined to return a > NamedList could actually be declared to be a SimpleOrderedMap and eventually > simply Map. > There's some risk that code somewhere gets this Map, a large one, and then > assumes it has better than O(N) lookup, which it doesn't provide. Perhaps a > Javadoc warning will do. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org
[jira] [Commented] (SOLR-17623) SimpleOrderedMap should implement Map
[ https://issues.apache.org/jira/browse/SOLR-17623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17922865#comment-17922865 ] ASF subversion and git services commented on SOLR-17623: Commit a6bb507304674f0cc3e5f85fed0ef233de4a2fe5 in solr's branch refs/heads/branch_9x from Renato Haeberli [ https://gitbox.apache.org/repos/asf?p=solr.git;h=a6bb5073046 ] SOLR-17623: SimpleOrderedMap implements Map (#3048) Also added NamedList.indexOf(name) convenience method. Does *not* adjust asShallowMap() yet. Coming soon. - Co-authored-by: David Smiley (cherry picked from commit dac5fe1ea8375eaaa92be37fb2831fbc7cb2c9cc) > SimpleOrderedMap should implement Map > - > > Key: SOLR-17623 > URL: https://issues.apache.org/jira/browse/SOLR-17623 > Project: Solr > Issue Type: Improvement >Reporter: David Smiley >Priority: Major > Labels: newdev, pull-request-available > Time Spent: 3h 10m > Remaining Estimate: 0h > > SimpleOrderedMap is semantically a Map; it should implement Map. > Why: This will help us transition away from NamedList (it's superclass) in a > number of places, since many (most?) places that are defined to return a > NamedList could actually be declared to be a SimpleOrderedMap and eventually > simply Map. > There's some risk that code somewhere gets this Map, a large one, and then > assumes it has better than O(N) lookup, which it doesn't provide. Perhaps a > Javadoc warning will do. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org
[jira] [Commented] (SOLR-17623) SimpleOrderedMap should implement Map
[ https://issues.apache.org/jira/browse/SOLR-17623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17922846#comment-17922846 ] ASF subversion and git services commented on SOLR-17623: Commit dac5fe1ea8375eaaa92be37fb2831fbc7cb2c9cc in solr's branch refs/heads/main from Renato Haeberli [ https://gitbox.apache.org/repos/asf?p=solr.git;h=dac5fe1ea83 ] SOLR-17623: SimpleOrderedMap implements Map (#3048) Also added NamedList.indexOf(name) convenience method. Does *not* adjust asShallowMap() yet. Coming soon. - Co-authored-by: David Smiley > SimpleOrderedMap should implement Map > - > > Key: SOLR-17623 > URL: https://issues.apache.org/jira/browse/SOLR-17623 > Project: Solr > Issue Type: Improvement >Reporter: David Smiley >Priority: Major > Labels: newdev, pull-request-available > Time Spent: 3h 10m > Remaining Estimate: 0h > > SimpleOrderedMap is semantically a Map; it should implement Map. > Why: This will help us transition away from NamedList (it's superclass) in a > number of places, since many (most?) places that are defined to return a > NamedList could actually be declared to be a SimpleOrderedMap and eventually > simply Map. > There's some risk that code somewhere gets this Map, a large one, and then > assumes it has better than O(N) lookup, which it doesn't provide. Perhaps a > Javadoc warning will do. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org
[jira] [Commented] (SOLR-17623) SimpleOrderedMap should implement Map
[ https://issues.apache.org/jira/browse/SOLR-17623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17914579#comment-17914579 ] Renato Haeberli commented on SOLR-17623: [~dsmiley] Could you please assign the ticket to me? Looks like I do not have permissions to do that, Thanks > SimpleOrderedMap should implement Map > - > > Key: SOLR-17623 > URL: https://issues.apache.org/jira/browse/SOLR-17623 > Project: Solr > Issue Type: Improvement >Reporter: David Smiley >Priority: Major > Labels: newdev > > SimpleOrderedMap is semantically a Map; it should implement Map. > Why: This will help us transition away from NamedList (it's superclass) in a > number of places, since many (most?) places that are defined to return a > NamedList could actually be declared to be a SimpleOrderedMap and eventually > simply Map. > There's some risk that code somewhere gets this Map, a large one, and then > assumes it has better than O(N) lookup, which it doesn't provide. Perhaps a > Javadoc warning will do. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org
[jira] [Commented] (SOLR-17623) SimpleOrderedMap should implement Map
[ https://issues.apache.org/jira/browse/SOLR-17623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17914236#comment-17914236 ] Renato Haeberli commented on SOLR-17623: No worries, I am not doing a code base wide transformation;) > SimpleOrderedMap should implement Map > - > > Key: SOLR-17623 > URL: https://issues.apache.org/jira/browse/SOLR-17623 > Project: Solr > Issue Type: Improvement >Reporter: David Smiley >Priority: Major > Labels: newdev > > SimpleOrderedMap is semantically a Map; it should implement Map. > Why: This will help us transition away from NamedList (it's superclass) in a > number of places, since many (most?) places that are defined to return a > NamedList could actually be declared to be a SimpleOrderedMap and eventually > simply Map. > There's some risk that code somewhere gets this Map, a large one, and then > assumes it has better than O(N) lookup, which it doesn't provide. Perhaps a > Javadoc warning will do. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org
[jira] [Commented] (SOLR-17623) SimpleOrderedMap should implement Map
[ https://issues.apache.org/jira/browse/SOLR-17623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17914218#comment-17914218 ] David Smiley commented on SOLR-17623: - Okay; implement put, etc. See NamedList.asShallowMap for some code to borrow, at least partially. The scope of this issue/PR should be fairly limited though, _mostly_ scoped to this class. It's not a codebase wide transformation. > SimpleOrderedMap should implement Map > - > > Key: SOLR-17623 > URL: https://issues.apache.org/jira/browse/SOLR-17623 > Project: Solr > Issue Type: Improvement >Reporter: David Smiley >Priority: Major > Labels: newdev > > SimpleOrderedMap is semantically a Map; it should implement Map. > Why: This will help us transition away from NamedList (it's superclass) in a > number of places, since many (most?) places that are defined to return a > NamedList could actually be declared to be a SimpleOrderedMap and eventually > simply Map. > There's some risk that code somewhere gets this Map, a large one, and then > assumes it has better than O(N) lookup, which it doesn't provide. Perhaps a > Javadoc warning will do. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org
[jira] [Commented] (SOLR-17623) SimpleOrderedMap should implement Map
[ https://issues.apache.org/jira/browse/SOLR-17623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17914181#comment-17914181 ] Renato Haeberli commented on SOLR-17623: [~dsmiley] But with limiting Map to a read-only view, we won't be in in the position to move eventually to simply a Map where we use SimpleOrderedMap/NameList at the moment. I assume in most of the place where the types are used we also want to save something on them. > SimpleOrderedMap should implement Map > - > > Key: SOLR-17623 > URL: https://issues.apache.org/jira/browse/SOLR-17623 > Project: Solr > Issue Type: Improvement >Reporter: David Smiley >Priority: Major > Labels: newdev > > SimpleOrderedMap is semantically a Map; it should implement Map. > Why: This will help us transition away from NamedList (it's superclass) in a > number of places, since many (most?) places that are defined to return a > NamedList could actually be declared to be a SimpleOrderedMap and eventually > simply Map. > There's some risk that code somewhere gets this Map, a large one, and then > assumes it has better than O(N) lookup, which it doesn't provide. Perhaps a > Javadoc warning will do. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org
[jira] [Commented] (SOLR-17623) SimpleOrderedMap should implement Map
[ https://issues.apache.org/jira/browse/SOLR-17623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17913787#comment-17913787 ] David Smiley commented on SOLR-17623: - Perhaps the Map methods that modify can be UnsupportedOperationException, thus the Map is a read-only view. This side-steps concerns of {{put(key, value)}} being O(N). The real intention in this issue is a read-view; don't need a write-view. > SimpleOrderedMap should implement Map > - > > Key: SOLR-17623 > URL: https://issues.apache.org/jira/browse/SOLR-17623 > Project: Solr > Issue Type: Improvement >Reporter: David Smiley >Priority: Major > Labels: newdev > > SimpleOrderedMap is semantically a Map; it should implement Map. > Why: This will help us transition away from NamedList (it's superclass) in a > number of places, since many (most?) places that are defined to return a > NamedList could actually be declared to be a SimpleOrderedMap and eventually > simply Map. > There's some risk that code somewhere gets this Map, a large one, and then > assumes it has better than O(N) lookup, which it doesn't provide. Perhaps a > Javadoc warning will do. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org