@@ -4348,8 +4348,9 @@ fn parse_create_table_as() {
43484348 // BigQuery allows specifying table schema in CTAS
43494349 // ANSI SQL and PostgreSQL let you only specify the list of columns
43504350 // (without data types) in a CTAS, but we have yet to support that.
4351+ let dialects = all_dialects_where(|d| d.supports_create_table_multi_schema_info_sources());
43514352 let sql = "CREATE TABLE t (a INT, b INT) AS SELECT 1 AS b, 2 AS a";
4352- match verified_stmt(sql) {
4353+ match dialects. verified_stmt(sql) {
43534354 Statement::CreateTable(CreateTable { columns, query, .. }) => {
43544355 assert_eq!(columns.len(), 2);
43554356 assert_eq!(columns[0].to_string(), "a INT".to_string());
@@ -4454,20 +4455,6 @@ fn parse_create_or_replace_table() {
44544455 }
44554456 _ => unreachable!(),
44564457 }
4457-
4458- let sql = "CREATE TABLE t (a INT, b INT) AS SELECT 1 AS b, 2 AS a";
4459- match verified_stmt(sql) {
4460- Statement::CreateTable(CreateTable { columns, query, .. }) => {
4461- assert_eq!(columns.len(), 2);
4462- assert_eq!(columns[0].to_string(), "a INT".to_string());
4463- assert_eq!(columns[1].to_string(), "b INT".to_string());
4464- assert_eq!(
4465- query,
4466- Some(Box::new(verified_query("SELECT 1 AS b, 2 AS a")))
4467- );
4468- }
4469- _ => unreachable!(),
4470- }
44714458}
44724459
44734460#[test]
0 commit comments