When querying for Tasks using the TaskService, the local variables for the Task are not populated. The variables have to be retrieved separately from the TaskService, resulting in extra requests / queries. This makes sense from a performance perspective for default queries.
However, having the option to ask the TaskService explicitly to perform the join on the local variables would be very beneficial in cases where Tasks have a lot of metadata, which is stored in local variables. In fact, not the TaskService but the TaskQuery could add this as part of the fluent API. In pseudocode, this could look something like this:
At the moment, the Task interface doesn't expose the variables, which matches the current functionality. Having to perform a downcast to TaskEntity is undesirable, so an extension to the Task interface would be useful in combination with the new query possibility.