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


##########
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:
   ✅ **CodeAnt verified this suggestion was addressed in subsequent commits and 
marked this thread resolved** as of `1360f15`.
   
   When a column entry omits the attribute, the helper now looks up the stored 
value using the same key as the write path: `column_name` for overrides and 
`id` for existing upserts. Entries treated as new still return `None`.
   
   <sub>If that's not right, unresolve this thread and CodeAnt will leave it 
open.</sub>
   
   <!-- codeant-auto-resolve-reply -->



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

  • Re: [PR] fi... via GitHub
    • Re: [P... via GitHub
    • Re: [P... via GitHub
    • Re: [P... via GitHub
    • Re: [P... github-actions[bot] (via GitHub) via notifications
    • Re: [P... codeant-ai-for-open-source[bot] (via GitHub) via notifications
    • Re: [P... codeant-ai-for-open-source[bot] (via GitHub) via notifications
    • Re: [P... sadpandajoe (via GitHub) via notifications
    • Re: [P... hughhhh (via GitHub) via notifications
    • Re: [P... hughhhh (via GitHub) via notifications

Reply via email to