bito-code-review[bot] commented on PR #43737:
URL: https://github.com/apache/superset/pull/43737#issuecomment-5486569337

   <!-- Bito Reply -->
   The issue is that the `require_column` helper in 
`resolve_gantt_query_fields` (in `superset/mcp_service/chart/chart_helpers.py`) 
only checks for `column_name` in the dictionary, but the Pydantic 
`GanttChartConfig` model and other parts of the system might expect or provide 
different keys for adhoc columns (like `label` or `expressionType`). To resolve 
this, update `require_column` to accept the same column reference structure as 
the Pydantic model, ensuring consistency between the query field extraction and 
the configuration validation.
   
   Would you like me to implement this fix for you? I can also check the rest 
of the PR comments if you'd like to address them as well.
   
   **superset/mcp_service/chart/chart_helpers.py**
   ```
   if isinstance(value, dict) and 0 < len(value) <= 20:
               # QueryFormColumn objects use column_name for physical columns or
               # expressionType/sqlExpression/label for adhoc columns.
               if value.get("column_name") or value.get("label"):
                   return value
   ```


-- 
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]

Reply via email to