aminghadersohi commented on PR #36937: URL: https://github.com/apache/superset/pull/36937#issuecomment-3717312390
## Addressing Review Feedback ### â Fixed: Unbounded row fetch risk Added `MAX_ROW_LIMIT = 10000` constant and capped all row limit calculations using `min(request.limit or 100, MAX_ROW_LIMIT)`. This prevents excessive memory/DB load when clients request large datasets. ### â Added: Unit tests for new feature Added comprehensive unit tests in `tests/unit_tests/mcp_service/chart/tool/test_get_chart_data.py` covering: - `GetChartDataRequest` schema validation including the new `include_raw_data` field - `MAX_ROW_LIMIT` constant and row limit capping logic - All 13 tests pass ### âšī¸ Re: Backward-incompatible schema change (False Positive) The CodeAnt review flagged `DataColumn` model fields as potentially backward-incompatible, but this is **not related to this PR**. The `DataColumn` schema was not modified in this PR - it's pre-existing code. My changes only touched: 1. `GetChartDataRequest` schema - added new optional field `include_raw_data` with default `False` (backward compatible) 2. `get_chart_data` function - added `@parse_request` decorator and raw data logic The flagged lines (R1117-R1130) are far outside my diff which only modified lines 978-985 in schemas.py. -- 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]
