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