-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding SET statement for configuration management #1180
Adding SET statement for configuration management #1180
Conversation
modified: evadb/parser/evadb.lark
modified: evadb/parser/evadb.lark Added class for set_statement new file: evadb/parser/set_statement.py Added SET to statement_types modified: evadb/parser/types.py
statement modified: evadb/parser/evadb.lark modified: evadb/parser/lark_visitor/__init__.py new file: evadb/parser/lark_visitor/_set_statement.py
modified: evadb/executor/plan_executor.py new file: evadb/executor/set_executor.py Added an optimizer for set queries modified: evadb/optimizer/operators.py modified: evadb/optimizer/statement_to_opr_converter.py Added a plan for set queries new file: evadb/plan_nodes/set_plan.py modified: evadb/plan_nodes/types.py
Hi @jiashenC @xzdandy @gaurav274 adding you as reviewers. This PR is up for an early review Have added parser, executor, plan and optimizer for SET queries please give them a look. I see that the we send config with a category param as well. Wanted to make sure if we wanted to continue with that design, since in the example given duckDB did not have that Will take up SELECT command for displaying configs and tests for this in separate PRs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! The design looks good to me. Just some clarification questions
- Are we going to universally use
string
type forconfig value
? This can be easier if we want to store those values in the catalog. - Are we going to persist configuration values and those changes will be part of this PR?
For 1, I am not very sure since there is an example where we are adding tuples in
We could serialize-deserialize but that would also require us saving the type. For 2, I do not think we are. This is more about about creating the query to manage configurations. Persisting to disk can be taken as a natural extension of this problem once done. |
Great work. Looks good to me overall. Let's add a test cases to verify the config value has been changed. |
Hi @jiashenC, @xzdandy and @gaurav274. Was confused about this and wanted to run this by you. In eva the current way we do configs is by three params
This PR captures config_key and config_value but not category. For that do we want to change the method to include category or not? If we change category then our query looks something like
or something that involves passing the category as well. OR Since DuckDB and Postgres like @xzdandy added they just have key and value. No concept of category. That is the way query is currently implemented. This seems to be the common way DBs add configs.
What do you say? |
I vote for going with Postgres's approach. |
Let's ditch https://www.postgresql.org/docs/current/config-setting.html#CONFIG-SETTING-SQL |
modified: evadb/executor/set_executor.py Since we use a comparitor in the LOGICAL OPERTATORS on LOGICAL DELIMITER, we have to put LOGICALSET over LOGICALDELIMITER modified: evadb/optimizer/operators.py Fixed typo (private data member) modified: evadb/optimizer/statement_to_opr_converter.py Added a construct for TO modified: evadb/parser/evadb.lark Make class variables as properties modified: evadb/parser/set_statement.py Added a short integration test for end to end query testing new file: test/integration_tests/short/test_set_executor.py Added a unit test for SET query parsing modified: test/unit_tests/parser/test_parser.py
modified: evadb/executor/plan_executor.py modified: evadb/executor/set_executor.py modified: evadb/parser/utils.py modified: test/unit_tests/parser/test_parser.py
modified: evadb/executor/set_executor.py modified: evadb/plan_nodes/set_plan.py
@gaurav274 @xzdandy @jiashenC this is up for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work. Nits: fix the linter.
Done @xzdandy |
Since I am not using the plan classes now, I will remove them |
skipping those modified: evadb/executor/set_executor.py modified: evadb/optimizer/operators.py modified: evadb/optimizer/statement_to_opr_converter.py deleted: evadb/plan_nodes/set_plan.py modified: evadb/plan_nodes/types.py modified: test/unit_tests/optimizer/test_statement_to_opr_converter.py
Added