mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-12-23 11:12:51 +00:00
Snowflake: Numeric prefix for stage name part (#1966)
Some checks are pending
license / Release Audit Tool (RAT) (push) Waiting to run
Rust / codestyle (push) Waiting to run
Rust / lint (push) Waiting to run
Rust / benchmark-lint (push) Waiting to run
Rust / compile (push) Waiting to run
Rust / docs (push) Waiting to run
Rust / compile-no-std (push) Waiting to run
Rust / test (beta) (push) Waiting to run
Rust / test (nightly) (push) Waiting to run
Rust / test (stable) (push) Waiting to run
Some checks are pending
license / Release Audit Tool (RAT) (push) Waiting to run
Rust / codestyle (push) Waiting to run
Rust / lint (push) Waiting to run
Rust / benchmark-lint (push) Waiting to run
Rust / compile (push) Waiting to run
Rust / docs (push) Waiting to run
Rust / compile-no-std (push) Waiting to run
Rust / test (beta) (push) Waiting to run
Rust / test (nightly) (push) Waiting to run
Rust / test (stable) (push) Waiting to run
This commit is contained in:
parent
7558d35c84
commit
40b187f32a
2 changed files with 3 additions and 2 deletions
|
|
@ -841,6 +841,7 @@ pub fn parse_stage_name_identifier(parser: &mut Parser) -> Result<Ident, ParserE
|
|||
Token::Mod => ident.push('%'),
|
||||
Token::Div => ident.push('/'),
|
||||
Token::Plus => ident.push('+'),
|
||||
Token::Number(n, _) => ident.push_str(n),
|
||||
Token::Word(w) => ident.push_str(&w.to_string()),
|
||||
_ => return parser.expected("stage name identifier", parser.peek_token()),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2628,7 +2628,7 @@ fn test_snowflake_copy_into() {
|
|||
}
|
||||
|
||||
// Test for non-ident characters in stage names
|
||||
let sql = "COPY INTO a.b FROM @namespace.stage_name/x@x~x%x+";
|
||||
let sql = "COPY INTO a.b FROM @namespace.stage_name/x@x~x%x+/20250723_data";
|
||||
assert_eq!(snowflake().verified_stmt(sql).to_string(), sql);
|
||||
match snowflake().verified_stmt(sql) {
|
||||
Statement::CopyIntoSnowflake { into, from_obj, .. } => {
|
||||
|
|
@ -2640,7 +2640,7 @@ fn test_snowflake_copy_into() {
|
|||
from_obj,
|
||||
Some(ObjectName::from(vec![
|
||||
Ident::new("@namespace"),
|
||||
Ident::new("stage_name/x@x~x%x+")
|
||||
Ident::new("stage_name/x@x~x%x+/20250723_data")
|
||||
]))
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue