codeant-ai-for-open-source[bot] commented on code in PR #43319:
URL: https://github.com/apache/superset/pull/43319#discussion_r3810476275


##########
superset/datasets/api.py:
##########
@@ -278,6 +278,18 @@ class DatasetRestApi(SoftDeleteApiMixin, 
BaseSupersetModelRestApi):
         "database.backend",
         "database.allow_multi_catalog",
         "columns.advanced_data_type",
+        # Certification/warning metadata is stored serialized in the ``extra``
+        # column and surfaced through model properties. Exposing them keeps 
this
+        # payload consistent with the datasource serialization used by Explore,
+        # so clients hydrating from this endpoint don't lose the badges.
+        "columns.certification_details",
+        "columns.certified_by",
+        "columns.is_certified",
+        "columns.warning_markdown",
+        "metrics.certification_details",
+        "metrics.certified_by",
+        "metrics.is_certified",
+        "metrics.warning_markdown",

Review Comment:
   **Suggestion:** Each newly exposed certification property independently 
reparses the same serialized `extra` value, so every column and metric incurs 
up to four additional JSON parses during serialization. On wide datasets this 
adds avoidable CPU and latency to every `show` request; parse the metadata once 
and serialize the derived fields from the cached mapping or a single combined 
representation. [performance]
   
   <details>
   <summary><b>Severity Level:</b> Minor ๐Ÿงน</summary>
   
   ```mdx
   - โš ๏ธ Dataset show responses parse metadata repeatedly.
   - โš ๏ธ Wide datasets incur additional serialization CPU.
   - โš ๏ธ Large Explore datasource hydration may add latency.
   ```
   </details>
   
   [![Use CodeAnt 
Skill](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/use-codeant-skill-flat-v2.svg)](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
   <details>
   <summary><b>Prompt for AI Agent ๐Ÿค– </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** superset/datasets/api.py
   **Line:** 285:292
   **Comment:**
        *Performance: Each newly exposed certification property independently 
reparses the same serialized `extra` value, so every column and metric incurs 
up to four additional JSON parses during serialization. On wide datasets this 
adds avoidable CPU and latency to every `show` request; parse the metadata once 
and serialize the derived fields from the cached mapping or a single combined 
representation.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve 
this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask 
user if the user wants to fix the rest of the comments as well. if said yes, 
then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43319&comment_hash=503da3079726c60944e920548cc698206b9caf625fe76c9b1a8c85738ae4a776&reaction=like'>๐Ÿ‘</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43319&comment_hash=503da3079726c60944e920548cc698206b9caf625fe76c9b1a8c85738ae4a776&reaction=dislike'>๐Ÿ‘Ž</a>



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