Uploading a new preview patch that addresses the known issues with the first patch and also adds some test cases. To get the correct expansion of asterisks, the natural join was transformed to a USING join earlier, at the end of bindExpression(). Also, the transformation of a USING clause to a join condition was modified so that it generates a valid join clause if there are no common columns (otherwise it would generate an AndNode with no children and cause a NullPointerException).
One new problem was found: Combining NATURAL with other join operators may fail with a NullPointerException. For example, this query fails:
SELECT * FROM T1 CROSS JOIN T2 NATURAL JOIN T3
The problem appears to be that the RCL of the CROSS JOIN operation has not been instantiated when the USING clause for the NATURAL JOIN operation is generated. The RCL is actually still null when the expansion of asterisks happens, so simply delaying the generation of the USING clause until we need it doesn't prevent the NPE (we need to know the common columns to expand asterisks correctly).