Files
doris/regression-test/data/query_p0/set/test_user_var.out
Chengpeng Yan ae428c29e2 [feature](planner)(nereids) support user defined variable (#20334)
Support user-defined variables.
After this PR, we can use `set @a = xx` to define a user variable and use it in the query like `select @a`.

the changes of this PR:
1. Support the grammar for `set user variable` in the parser.
2. Add the `userVars` in `VariableMgr` to store the user-defined variables.
3. For the `set @a = xx`, we will store the variable name and its value in the `userVars` in `VariableMgr`.
4. For the `select @a`, we will get the value for the variable name in `userVars`.
2023-06-06 14:35:16 +08:00

17 lines
215 B
Plaintext

-- This file is automatically generated. You should know what you did if you want to edit this
-- !select1 --
1 0 -1
-- !select2 --
1.1 0.0 -1.1
-- !select3 --
H
-- !select4 --
true false
-- !select5 --
\N \N