korbit-ai[bot] commented on code in PR #33710:
URL: https://github.com/apache/superset/pull/33710#discussion_r2132768273
##########
superset/migrations/shared/migrate_viz/base.py:
##########
@@ -169,10 +170,11 @@
queries = clz._build_query()["queries"]
query_context["queries"] = queries
+ else:
+ query_context = clz._build_query()
Review Comment:
### Missing Query Builder Implementation <sub></sub>
<details>
<summary>Tell me more</summary>
###### What is the issue?
The _build_query method is not implemented in the base class but is called
during the upgrade process when query_context is None.
###### Why this matters
This will raise NotImplementedError or return unexpected results in child
classes that don't properly implement the method, causing migration failures.
###### Suggested change ∙ *Feature Preview*
Add a base implementation or make the method abstract:
```python
def _build_query(self) -> Any | dict[str, Any]:
raise NotImplementedError("Child classes must implement _build_query")
```
###### Provide feedback to improve future suggestions
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/e5794ea0-5f9b-4bc9-af49-5cb4c9069951/upvote)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/e5794ea0-5f9b-4bc9-af49-5cb4c9069951?what_not_true=true)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/e5794ea0-5f9b-4bc9-af49-5cb4c9069951?what_out_of_scope=true)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/e5794ea0-5f9b-4bc9-af49-5cb4c9069951?what_not_in_standard=true)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/e5794ea0-5f9b-4bc9-af49-5cb4c9069951)
</details>
<sub>
💬 Looking for more details? Reply to this comment to chat with Korbit.
</sub>
<!--- korbi internal id:fac435af-e13f-406d-96d6-8852fd864d9e -->
[](fac435af-e13f-406d-96d6-8852fd864d9e)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]