Skip to content

Commit e876c0c

Browse files
add test
1 parent ccf903c commit e876c0c

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

tests/sqlparser_common.rs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4725,6 +4725,34 @@ fn parse_alter_table() {
47254725
}
47264726
_ => unreachable!(),
47274727
}
4728+
4729+
let set_storage_parameters = "ALTER TABLE tab SET (autovacuum_vacuum_scale_factor = 0.01, autovacuum_vacuum_threshold = 500)";
4730+
match alter_table_op(verified_stmt(set_storage_parameters)) {
4731+
AlterTableOperation::SetStorageParameters { storage_parameters } => {
4732+
assert_eq!(
4733+
storage_parameters,
4734+
[
4735+
SqlOption::KeyValue {
4736+
key: Ident {
4737+
value: "autovacuum_vacuum_scale_factor".to_string(),
4738+
quote_style: None,
4739+
span: Span::empty(),
4740+
},
4741+
value: Expr::Value(test_utils::number("0.01").with_empty_span()),
4742+
},
4743+
SqlOption::KeyValue {
4744+
key: Ident {
4745+
value: "autovacuum_vacuum_threshold".to_string(),
4746+
quote_style: None,
4747+
span: Span::empty(),
4748+
},
4749+
value: Expr::Value(test_utils::number("500").with_empty_span()),
4750+
}
4751+
],
4752+
);
4753+
}
4754+
_ => unreachable!(),
4755+
}
47284756
}
47294757

47304758
#[test]

0 commit comments

Comments
 (0)