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


##########
superset/commands/dataset/update.py:
##########
@@ -608,29 +613,31 @@ def _validate_partition_mapping(self, exceptions: 
list[ValidationError]) -> None
                     ValidationError(reason, 
field_name="partition_value_transform")
                 )
 
-    def _effective_transform(
+    def _effective_column_attribute(
         self,
         columns: list[dict[str, Any]] | None,
-        mapped_column: str | None,
+        column_name: str | None,
+        attribute: str,
     ) -> str | None:
         """
-        The value transform on the effective mapped column.
+        One attribute of a named column, as this request will leave it.
 
         Reads from the payload when the request carries columns, and from the
         persisted model otherwise -- a PUT that changes only `partition_column`
-        still has to be validated against the transform already stored.
+        still has to be validated against the transform already stored, and
+        against the expression of the column it now names.
         """
-        if not mapped_column:
+        if not column_name:
             return None
         if columns is not None:
             for column in columns:
-                if column.get("column_name") == mapped_column:
-                    return column.get("partition_value_transform")
+                if column.get("column_name") == column_name:
+                    return column.get(attribute)

Review Comment:
   **Suggestion:** A partial column entry without `expression` returns `None` 
here, while `update_columns` preserves the stored expression; a Jinja-templated 
partition column can therefore escape validation.
   
   **Assessment:** ๐ŸŸ  `Major` ยท ๐Ÿ” `Occurrence: Sometimes` ยท ๐Ÿท๏ธ `Api mismatch`
   
   [![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)
 [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=9b6e9ccac71d4d7f80b87823356b4c12&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=9b6e9ccac71d4d7f80b87823356b4c12&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   <details>
   <summary><b>Prompt for AI Agent ๐Ÿค– </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** superset/commands/dataset/update.py
   **Line:** 635:635
   **Comment:**
        *Api Mismatch: A partial column entry without `expression` returns 
`None` here, while `update_columns` preserves the stored expression; a 
Jinja-templated partition column can therefore escape validation.
   
   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%2F45546&comment_hash=4a2d1b282d087ed3a7ee86645e74253314bfa0d34c2e98ffa064a4dfcb138374&reaction=like'>๐Ÿ‘</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F45546&comment_hash=4a2d1b282d087ed3a7ee86645e74253314bfa0d34c2e98ffa064a4dfcb138374&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