Make FileFormat case insensitive (#200)

This commit is contained in:
Daniël Heres 2020-06-12 17:10:44 +02:00 committed by GitHub
parent a0f076acda
commit 68afa2a764
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 1 deletions

View file

@ -1289,6 +1289,24 @@ fn parse_create_external_table() {
}
}
#[test]
fn parse_create_external_table_lowercase() {
let sql = "create external table uk_cities (\
name varchar(100) not null,\
lat double null,\
lng double)\
stored as parquet location '/tmp/example.csv'";
let ast = one_statement_parses_to(
sql,
"CREATE EXTERNAL TABLE uk_cities (\
name character varying(100) NOT NULL, \
lat double NULL, \
lng double) \
STORED AS PARQUET LOCATION '/tmp/example.csv'",
);
assert_matches!(ast, Statement::CreateTable{..});
}
#[test]
fn parse_create_table_empty() {
// Zero-column tables are weird, but supported by at least PostgreSQL.