clflushopt commented on code in PR #23488:
URL: https://github.com/apache/datafusion/pull/23488#discussion_r3589007597
##########
datafusion/substrait/src/logical_plan/producer/substrait_producer.rs:
##########
@@ -441,6 +450,30 @@ pub trait SubstraitProducer: Send + Sync + Sized {
from_placeholder(self, placeholder)
}
+ // Outer Schema management API.
+ //
+ // These methods manage a stack of outer schemas for correlated subquery
support
+ // such as when entering a subquery, the enclosing query's schema is
pushed onto
+ // the stack.
+ //
+ // Serializing an Expr::OuterReferenceColumn uses these to resolve the
column
+ // against the correct enclosing query and emit an OuterReference field
reference
+ // with the corresponding `steps_out`.
+
+ /// Push an outer schema onto the stack when entering a subquery.
+ fn push_outer_schema(&mut self, _schema: DFSchemaRef) {}
+
+ /// Pop an outer schema from the stack when leaving a subquery.
+ fn pop_outer_schema(&mut self) {}
+
+ /// Get the outer schema at the given nesting depth.
+ /// `steps_out = 1` is the immediately enclosing query, `steps_out = 2`
+ /// is two levels out, etc. Returns `None` if `steps_out` is 0 or
+ /// exceeds the current nesting depth.
+ fn get_outer_schema(&self, _steps_out: usize) -> Option<DFSchemaRef> {
Review Comment:
I agree on this, I don't like the `get` but I was opting to match the api of
`SubstraitConsumer::get_outer_schema`. I can do a separate micro PR to align
both apis.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]