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