Hey Simon,
I looked through your PR and added a couple comments. The main thing is I
think we can actually ignore the field context on "RemoveField", if only
because the executor doesn't need it. Even though the field might be
pointing to a related model, that doesn't prevent being optimized
I'm not sure if it's related or not wo what you're investigating,
RemoveField cannot "just" optimized through, as you might have another
AddField operation afterwards adding another field with the same name.
/Markus
On Thu, Feb 16, 2017 at 08:19:01AM -0800, raph...@makeleaps.com wrote:
Hey Simo
When you have AddField('A', 'foo', ForeignKey('B')), this operation
references A and foo, but also references B.
RemoveField('A', 'foo') also references A and foo, but does it reference B?
if it does, then it' s hard to have optimizations that pass through this,
because this field could be ref
OK, I'll probably hold off for a little bit just in case someone else wants
it. But I'll probably have some time soon to work on it.
Robert Roskam
On Wednesday, February 15, 2017 at 9:13:45 PM UTC-5, Tim Graham wrote:
>
> Yes, if a ticket goes weeks or months without activity, it's unlikely
> s
I'd like to see this happen! Don't worry about taking over from me!
On 17 Feb 2017 00:37, "Robert Roskam" wrote:
> OK, I'll probably hold off for a little bit just in case someone else
> wants it. But I'll probably have some time soon to work on it.
>
> Robert Roskam
>
> On Wednesday, February 1
> RemoveField('A', 'foo') also references A and foo, but does it reference
B? if it does, then it' s hard to have optimizations that pass through
this, because this field could be referencing any model (theoretically).
I think we all agree on that.
> But if we assert that RemoveField doesn't re
Hi Simon,
I think it's a bit more general than that. Why does the `RemoveField`
exist? Because somewhere, an `AddField`-esque operation exists before it,
right?
Let's say we have m, m' as models.
Let -F be a RemoveField(m, 'foo', ForeignKey(m') operation. We also have
two operations +M',
To clarify on my previous post, if we're in the first case, then the +M and
-F operations can be optimized in one path to remove the dependency, and
then the +M' and -M' operation can be optimized through.
In the second case (with an AddField operation), the +F and -F operations
will cancel each o