aminghadersohi commented on code in PR #44464:
URL: https://github.com/apache/superset/pull/44464#discussion_r4115808691


##########
superset/mcp_service/chart/schemas.py:
##########
@@ -2569,6 +2588,34 @@ class XYChartConfig(BaseChartConfig):
         ge=1,
         le=10000,
     )
+    sort_by: SortByConfig | str | List[SortByConfig | str] | None = Field(
+        None,
+        description=(
+            "Sort specification for the chart. Accepts a SortByConfig object, "
+            "a bare column/metric name string (defaults to descending), a "
+            "[column, ascending] pair, or a single-item list containing 
either. "
+            "Multi-column sorting is not supported for XY charts."
+        ),

Review Comment:
   `unit-tests` fails on this PR: this description pushes the `generate_chart` 
schema to 50127 B, over the 50000 B budget in `test_tool_inventory.py` (master 
is 49531 B). This wording brings it to 49978 B, and all `mcp_service` tests 
pass:
   
   ```suggestion
           description=(
               "Sort by the x column or one y metric; a bare name sorts "
               "descending, or pass [column, ascending]."
           ),
   ```



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