codeant-ai-for-open-source[bot] commented on code in PR #42895:
URL: https://github.com/apache/superset/pull/42895#discussion_r3761939445
##########
superset-frontend/src/explore/constants.ts:
##########
@@ -23,8 +23,11 @@ export const AGGREGATES = {
COUNT: 'COUNT',
COUNT_DISTINCT: 'COUNT_DISTINCT',
MAX: 'MAX',
+ MEDIAN: 'MEDIAN',
MIN: 'MIN',
+ STDDEV_SAMP: 'STDDEV_SAMP',
SUM: 'SUM',
+ VAR_SAMP: 'VAR_SAMP',
};
export const AGGREGATES_OPTIONS = Object.values(AGGREGATES);
Review Comment:
**Suggestion:** These options are added to the global metric picker for
every database, but the backend only supports them through engine-specific
opt-in and rejects them for most engine specs. Users can therefore select a
metric that cannot execute and only discover the incompatibility after
submitting the query. Filter or disable these options based on the active
database engine, or otherwise clearly mark unsupported aggregates before
selection. [api mismatch]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ❌ Unsupported aggregate charts fail when queries execute.
- ⚠️ Metric picker offers unavailable database capabilities.
- ⚠️ Users discover incompatibility only after saving and querying.
```
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=a0a5869b74b142f68659d81a451dba02&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=a0a5869b74b142f68659d81a451dba02&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-frontend/src/explore/constants.ts
**Line:** 26:32
**Comment:**
*Api Mismatch: These options are added to the global metric picker for
every database, but the backend only supports them through engine-specific
opt-in and rejects them for most engine specs. Users can therefore select a
metric that cannot execute and only discover the incompatibility after
submitting the query. Filter or disable these options based on the active
database engine, or otherwise clearly mark unsupported aggregates before
selection.
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%2F42895&comment_hash=df758cfe6b530b86787ff017a8c6b67b0784f69d29cc2e04e6c179995a4e3f18&reaction=like'>👍</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F42895&comment_hash=df758cfe6b530b86787ff017a8c6b67b0784f69d29cc2e04e6c179995a4e3f18&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]