Skip to content

Conversation

@nielspardon
Copy link
Member

This simplifies the OuterReferenceResolver as identified in https://github.com/substrait-io/substrait-java/pull/645/files#r2672534015

The way the OuterReferenceResolver is used in the code today does not encapsulate the fieldAccessDepthMap within the resolver but it gets used directly in SubstraitRelVisitor meaning that the getStepsOut method is never used. We could either try to encapsulate the map better within OuterReferenceResolver or we simply return the map as a result of the OuterReferenceResolver which this PR does:

  • removes getStepsOut and getFieldAccessDepthMap
  • returns fieldAccessDepthMap in apply method

Signed-off-by: Niels Pardon <par@zurich.ibm.com>
@benbellick
Copy link
Member

I haven't looked into this yet but wondering if there is value in adding any tests that ensure the behavior is still as we expect?

@nielspardon
Copy link
Member Author

I haven't looked into this yet but wondering if there is value in adding any tests that ensure the behavior is still as we expect?

There are already a few tests here:
https://github.com/substrait-io/substrait-java/blob/main/isthmus/src/test/java/io/substrait/isthmus/OuterReferenceResolverTest.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants