[ https://issues.apache.org/jira/browse/TINKERPOP-2927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17713820#comment-17713820 ]
ASF GitHub Bot commented on TINKERPOP-2927: ------------------------------------------- porunov commented on PR #2027: URL: https://github.com/apache/tinkerpop/pull/2027#issuecomment-1514008623 > Thanks @porunov for submitting this PR. The changes all look valid to me, but opening all of this up is a big change to TinkerPop and needs further consideration. Could you make a [DISCUSS] thread on the dev maillist to ensure that the community is aligned behind this change? Thank you for the feedback. I opened the discussion thread here: https://lists.apache.org/thread/vjbjh29kwjhd5lcmkqqqqrhw7rw2ynh9 > Make all Steps extensible and overridable > ------------------------------------------ > > Key: TINKERPOP-2927 > URL: https://issues.apache.org/jira/browse/TINKERPOP-2927 > Project: TinkerPop > Issue Type: Improvement > Components: driver > Affects Versions: 3.6.2 > Reporter: Oleksandr Porunov > Priority: Minor > > Related issue (fixed): https://issues.apache.org/jira/browse/TINKERPOP-2924 > > Working on optimization strategies sometimes require replacing steps with > extended version of those steps. At this moment not all steps can be extended > due to being `final` (like `ProjectStep`, `PropertyKeyStep`, > `PropertyValueStep`, `RangeLocalStep`, `SumLocalStep`, and many more). Thus, > it requires creating a similar step and duplicate some logic there instead of > simply extending a specific step. > > For those steps which are non-final there are sometimes private fields > without any getter methods (for example `private CallbackRegistry<Event> > callbackRegistry` in `DropStep` is `private`. Thus, the caller needs to use > Reflaction API to retrieve it's value). > > In JanusGraph we replace some steps with the extended version of those steps. > For example, we completely overwrite `flatMap` step of `PropertiesStep` which > is an anti-pattern, but in the case when it's hard to extend specific logic > parts such anti-pattern might be a a good solution I guess. > > I think it would make sense to let Graph developers to extend any step and > has access to it's fields / utility methods. > In such case we could do similar with `ProjectStep` and make it query data in > parallel (see issue: [https://github.com/JanusGraph/janusgraph/issues/3559] ). > > I'm also good not doing it in case anyone can suggest other patterns to > follow for those optimizations instead of overwriting logic. -- This message was sent by Atlassian Jira (v8.20.10#820010)