sql: minor adjustment to the CREATE VIEW initialization code.
sql: minor adjustment to the CREATE VIEW initialization code.

This patch moves the detection of uses of star expansion to an earlier
position, before plan expansion, so as to create the opportunity to
elide the selectNode during expansion.  If the detection code was not
moved, eliding a selectNode could remove any indication that star
expansion had occurred and the corresponding test in CREATE VIEW would
fail.

glycerine/cockroach,maxlang/cockroach,glycerine/cockroach,paperstreet/cockroach,maxlang/cockroach,maxlang/cockroach,maxlang/cockroach,paperstreet/cockroach,paperstreet/cockroach,maxlang/cockroach,glycerine/cockroach,glycerine/cockroach,vaibhavarora/cockroach,glycerine/cockroach,maxlang/cockroach,vaibhavarora/cockroach,paperstreet/cockroach,vaibhavarora/cockroach,glycerine/cockroach,vaibhavarora/cockroach,glycerine/cockroach,paperstreet/cockroach,paperstreet/cockroach,vaibhavarora/cockroach,vaibhavarora/cockroach,maxlang/cockroach,glycerine/cockroach,paperstreet/cockroach,vaibhavarora/cockroach,maxlang/cockroach,vaibhavarora/cockroach,paperstreet/cockroach