mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-22 06:54:07 +00:00
redshift: add support for CREATE VIEW … WITH NO SCHEMA BINDING (#979)
This commit is contained in:
parent
40e2ecbdf3
commit
c811e22605
5 changed files with 46 additions and 2 deletions
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue