I have found a rule that we cannot use future forms when using time clauses including expressions such as: while, before, after, until/till, as, once, as soon as, as long as, by the time Does this mean that below sentence is not grammatically correct if it contains "by the time"?
"How long will John have been working at the company by the time he retires?"