Add GLOBAL context/modifier to SET statements (#1767)

This commit is contained in:
Mohamed Abdeen 2025-03-20 07:52:56 +02:00 committed by GitHub
parent e3e88290cd
commit f487cbe004
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 72 additions and 39 deletions

View file

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