Support create table as query (CTAS).