Closed elilevine closed 10 years ago
These PTables created for joins are short-lived. They're basically the combined columns from two tables. Once the join completes, they would no longer be used. Please let me know if that's not the case @maryannxue.
We could choose one or the other baseTableName to pass through, but I'm not sure it matters. What do you think, @elilevine ?
Maybe it makes sense to clearer identify a PTable as a transient table meant to only support a one-time operation by adding a "temporary" property to PTable or something like that. That way these temporary tables can do away with PTable properties that are meant for tables that are part of DB metadata.
Short of that, we can just leave baseTableName as null IMHO.
I don't think there's any additional work required here, so I'l close this. We'll add test cases to confirm and if we find any issues we'll reopen.
In JoinCompiler.java there are two places where PtableImpl.makePTable is invoked. In both cases, null is passed as the last parameter (baseTableName). For tenant-specific tables baseTableName will be non-null. Need to handle that correctly.