redshift: add support for CREATE VIEW … WITH NO SCHEMA BINDING (#979)

This commit is contained in:
Lukasz Stefaniak 2023-10-02 19:42:01 +02:00 committed by GitHub
parent 40e2ecbdf3
commit c811e22605
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 46 additions and 2 deletions

View file

@ -16,6 +16,7 @@ mod test_utils;
use test_utils::*;
use sqlparser::ast::*;
use sqlparser::dialect::GenericDialect;
use sqlparser::dialect::RedshiftSqlDialect;
#[test]
@ -272,6 +273,13 @@ fn redshift() -> TestedDialects {
}
}
fn redshift_and_generic() -> TestedDialects {
TestedDialects {
dialects: vec![Box::new(RedshiftSqlDialect {}), Box::new(GenericDialect {})],
options: None,
}
}
#[test]
fn test_sharp() {
let sql = "SELECT #_of_values";
@ -281,3 +289,9 @@ fn test_sharp() {
select.projection[0]
);
}
#[test]
fn test_create_view_with_no_schema_binding() {
redshift_and_generic()
.verified_stmt("CREATE VIEW myevent AS SELECT eventname FROM event WITH NO SCHEMA BINDING");
}