Skip to content

Commit 16639bc

Browse files
committed
Generalize positive tests
1 parent 6b9925b commit 16639bc

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

tests/sqlparser_common.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5064,6 +5064,9 @@ fn parse_alter_table_alter_column_type() {
50645064
_ => unreachable!(),
50655065
}
50665066

5067+
let dialects = all_dialects_where(|d| d.supports_alter_column_type_without_set());
5068+
dialects.verified_stmt(&format!("{alter_stmt} ALTER COLUMN is_active TYPE TEXT"));
5069+
50675070
let dialects = all_dialects_except(|d| d.supports_alter_column_type_without_set());
50685071
let res =
50695072
dialects.parse_sql_statements(&format!("{alter_stmt} ALTER COLUMN is_active TYPE TEXT"));
@@ -5072,6 +5075,11 @@ fn parse_alter_table_alter_column_type() {
50725075
res.unwrap_err()
50735076
);
50745077

5078+
let dialects = all_dialects_where(|d| d.supports_alter_column_type_using());
5079+
dialects.verified_stmt(&format!(
5080+
"{alter_stmt} ALTER COLUMN is_active SET DATA TYPE TEXT USING 'text'"
5081+
));
5082+
50755083
let dialects = all_dialects_except(|d| d.supports_alter_column_type_using());
50765084
let res = dialects.parse_sql_statements(&format!(
50775085
"{alter_stmt} ALTER COLUMN is_active SET DATA TYPE TEXT USING 'text'"

tests/sqlparser_redshift.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,3 @@ fn parse_extract_single_quotes() {
402402
fn parse_string_literal_backslash_escape() {
403403
redshift().one_statement_parses_to(r#"SELECT 'l\'auto'"#, "SELECT 'l''auto'");
404404
}
405-
406-
#[test]
407-
fn test_alter_column_type() {
408-
redshift().verified_stmt("ALTER TABLE customers ALTER COLUMN email TYPE TEXT");
409-
}

0 commit comments

Comments
 (0)