[MDEV-26285] Refactor spider_db_mbase_util::open_item_func() Created: 2021-07-31 Updated: 2023-09-12 Resolved: 2023-01-22 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Spider |
| Fix Version/s: | N/A |
| Type: | Task | Priority: | Critical |
| Reporter: | Nayuta Yanagisawa (Inactive) | Assignee: | Sergei Golubchik |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||
| Epic Link: | Spider Refactoring | ||||||||||||||||||||
| Description |
|
spider_db_mbase_util::open_item_func() is a so-called monster function. It is difficult to maintain while it is expected that we need to modify it when a new SQL function or a new func_type is added.
NOTE: You don't need to make everything ideal at once, and it's impossible to do that with complex middleware like databases. Refactor only to the extent that you are sure it is safe to do so without additional unit tests. |
| Comments |
| Comment by Nayuta Yanagisawa (Inactive) [ 2021-08-15 ] |
|
serg Please review the following patch. I refactored a little conservatively. Actually, I tried further refactoring but I noticed that it was too dangerous. https://github.com/MariaDB/server/commit/fa8a4a33c71807f37429c70e358b46c1f0aaf7c2 |
| Comment by Nayuta Yanagisawa (Inactive) [ 2021-08-15 ] |
|
serg Let me replace the patch. Please review this one. https://github.com/MariaDB/server/commit/3836098c29ef1b7ff9d5fbde99b690eab73a0df1 |
| Comment by Yuchen Pei [ 2022-12-23 ] |
|
Bumped priority as a refactoring will fix |
| Comment by Sergei Golubchik [ 2023-01-22 ] |
|
The review of this patch is done in |