codeant-ai-for-open-source[bot] commented on code in PR #45929:
URL: https://github.com/apache/superset/pull/45929#discussion_r4432969397
##########
superset/commands/dataset/update.py:
##########
@@ -576,14 +588,19 @@ def _validate_partition_mapping(self, exceptions:
list[ValidationError]) -> None
effective_mapped_column = partition_mapped_column or main_dttm_col
transform = self._effective_transform(columns, effective_mapped_column)
- for issue in validate_partition_mapping(
- column_names=column_names,
- partition_column=partition_column,
- partition_mapped_column=partition_mapped_column,
- main_dttm_col=main_dttm_col,
- transform=transform,
- engine=database.backend,
- ):
+ issues = (
+ validate_partition_mapping(
+ column_names=column_names,
+ partition_column=partition_column,
+ partition_mapped_column=partition_mapped_column,
+ main_dttm_col=main_dttm_col,
+ transform=transform,
+ engine=database.backend,
+ )
+ if database.db_engine_spec.supports_partition_filter_mapping
+ else validate_transform(transform, database.backend)
+ )
Review Comment:
**Suggestion:** This engine gate only affects REST updates; the deprecated
save route still validates references unconditionally and returns 422 for
dangling mappings on unsupported engines.
**Assessment:** ๐ `Major` ยท ๐ `Occurrence: Rarely` ยท ๐ท๏ธ `Api mismatch`
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=9fbe5834d82846499c3620ab6521ff7b&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
[](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=9fbe5834d82846499c3620ab6521ff7b&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:** 591:602
**Comment:**
*Api Mismatch: This engine gate only affects REST updates; the
deprecated save route still validates references unconditionally and returns
422 for dangling mappings on unsupported engines.
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%2F45929&comment_hash=5f508ea53db73917b3b4c8b2f36b02f2d2a50d6513a0205877270d7d842cfda7&reaction=like'>๐</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F45929&comment_hash=5f508ea53db73917b3b4c8b2f36b02f2d2a50d6513a0205877270d7d842cfda7&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]