mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-09 21:42:05 +00:00
snowflake: Fix handling of /~%
in the stage name (#1009)
This commit is contained in:
parent
2f437db2a6
commit
7b3cc18229
3 changed files with 72 additions and 5 deletions
|
@ -26,6 +26,9 @@ use test_utils::*;
|
|||
#[macro_use]
|
||||
mod test_utils;
|
||||
|
||||
#[cfg(test)]
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
#[test]
|
||||
fn test_snowflake_create_table() {
|
||||
let sql = "CREATE TABLE _my_$table (am00unt number)";
|
||||
|
@ -1118,3 +1121,16 @@ fn parse_subquery_function_argument() {
|
|||
// the function.
|
||||
snowflake().one_statement_parses_to("SELECT func(SELECT 1, 2)", "SELECT func((SELECT 1, 2))");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_division_correctly() {
|
||||
snowflake_and_generic().one_statement_parses_to(
|
||||
"SELECT field/1000 FROM tbl1",
|
||||
"SELECT field / 1000 FROM tbl1",
|
||||
);
|
||||
|
||||
snowflake_and_generic().one_statement_parses_to(
|
||||
"SELECT tbl1.field/tbl2.field FROM tbl1 JOIN tbl2 ON tbl1.id = tbl2.entity_id",
|
||||
"SELECT tbl1.field / tbl2.field FROM tbl1 JOIN tbl2 ON tbl1.id = tbl2.entity_id",
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue