SET statements: scope modifier for multiple assignments (#1772)

This commit is contained in:
Mohamed Abdeen 2025-03-22 07:38:00 +02:00 committed by GitHub
parent 939fbdd4f6
commit 3a8a3bb7a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 133 additions and 94 deletions

View file

@ -21,10 +21,9 @@
//! is also tested (on the inputs it can handle).
use sqlparser::ast::{
ClusteredBy, CommentDef, ContextModifier, CreateFunction, CreateFunctionBody,
CreateFunctionUsing, CreateTable, Expr, Function, FunctionArgumentList, FunctionArguments,
Ident, ObjectName, OrderByExpr, OrderByOptions, SelectItem, Set, Statement, TableFactor,
UnaryOperator, Use, Value,
ClusteredBy, CommentDef, CreateFunction, CreateFunctionBody, CreateFunctionUsing, CreateTable,
Expr, Function, FunctionArgumentList, FunctionArguments, Ident, ObjectName, OrderByExpr,
OrderByOptions, SelectItem, Set, Statement, TableFactor, UnaryOperator, Use, Value,
};
use sqlparser::dialect::{GenericDialect, HiveDialect, MsSqlDialect};
use sqlparser::parser::ParserError;
@ -370,7 +369,7 @@ fn set_statement_with_minus() {
assert_eq!(
hive().verified_stmt("SET hive.tez.java.opts = -Xmx4g"),
Statement::Set(Set::SingleAssignment {
scope: ContextModifier::None,
scope: None,
hivevar: false,
variable: ObjectName::from(vec![
Ident::new("hive"),