@@ -4346,8 +4346,9 @@ fn parse_create_table_as() {
43464346 // BigQuery allows specifying table schema in CTAS
43474347 // ANSI SQL and PostgreSQL let you only specify the list of columns
43484348 // (without data types) in a CTAS, but we have yet to support that.
4349+ let dialects = all_dialects_where(|d| d.supports_create_table_multi_schema_info_sources());
43494350 let sql = "CREATE TABLE t (a INT, b INT) AS SELECT 1 AS b, 2 AS a";
4350- match verified_stmt(sql) {
4351+ match dialects. verified_stmt(sql) {
43514352 Statement::CreateTable(CreateTable { columns, query, .. }) => {
43524353 assert_eq!(columns.len(), 2);
43534354 assert_eq!(columns[0].to_string(), "a INT".to_string());
@@ -4452,20 +4453,6 @@ fn parse_create_or_replace_table() {
44524453 }
44534454 _ => unreachable!(),
44544455 }
4455-
4456- let sql = "CREATE TABLE t (a INT, b INT) AS SELECT 1 AS b, 2 AS a";
4457- match verified_stmt(sql) {
4458- Statement::CreateTable(CreateTable { columns, query, .. }) => {
4459- assert_eq!(columns.len(), 2);
4460- assert_eq!(columns[0].to_string(), "a INT".to_string());
4461- assert_eq!(columns[1].to_string(), "b INT".to_string());
4462- assert_eq!(
4463- query,
4464- Some(Box::new(verified_query("SELECT 1 AS b, 2 AS a")))
4465- );
4466- }
4467- _ => unreachable!(),
4468- }
44694456}
44704457
44714458#[test]
0 commit comments