Changes between Version 1 and Version 2 of Ticket #36025, comment 4


Ignore:
Timestamp:
Dec 18, 2024, 11:43:57 AM (4 weeks ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #36025, comment 4

    v1 v2  
    77`Expression.relabeled_clone`, which is called when subqueries are involved and tables need to be re-aliases to avoid conflicts, relies on `self.get_source_expression` to ''walk'' through the expression tree and make sure all nested references to tables are re-aliases. If you look at `Lookup.get_source_expressions` though you'll notice that the right-hand-side is excluded if it's not a ''compilable'' (this should likely be a ''resolvable'' check instead). Since `RangeLookup.rhs` is a `tuple` and thus not considered a ''resolvable'' it falls on its face and its members are not considered for re-labeling.
    88
    9 We have a larger problem here where lookups that allow containers of potentially ''resolvable'' members as right-hand-side (e.g. `__range`, `__in`) that are not considered as ''resolvable'' themselves that we should address but the immediate solution for `RangeLookup` appears to be wrapping it's right-hand-side in an `ExpressionList` at resolving time.
     9We have a larger problem here where lookups that allow containers of potentially ''resolvable'' members as right-hand-side (e.g. `__range`, `__in`) that are not considered as ''resolvable'' themselves that we should address but the immediate solution for `RangeLookup` appears to be wrapping it's right-hand-side in an `ExpressionList` at resolving time and adjusting its `as_sql` method accordingly.
Back to Top