You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "massucattoj (via GitHub)" <gi...@apache.org> on 2026/07/13 11:05:22 UTC

[PR] fix(explore): render Jinja before validating legacy chart filters [superset]

massucattoj opened a new pull request, #41996:
URL: https://github.com/apache/superset/pull/41996

   ### SUMMARY
   Using Jinja templating in a Custom SQL filter (e.g. a `HAVING` clause) on a legacy chart such as the Time-series Table raises `Invalid SQL clause.`
   
   **Root cause.** The legacy viz pipeline validated filter clauses with SQLGlot *before* rendering Jinja, so the raw template text was parsed as SQL and rejected. This happened in two redundant places:
   
   1. `split_adhoc_filters_into_base_filters` (`superset/utils/core.py`) 
   2. `BaseViz.query_obj()` (`superset/viz.py`) - re-sanitized the same clauses right after.
   
   The modern chart-data pipeline doesn't have this problem because it renders the template *before* validating (`QueryObject.validate()` → `processor.process_template(clause, force=True)` → `sanitize_clause`), which is why only legacy viz types were affected.
   
   **Fix.** Remove the premature validation instead of duplicating template rendering into the legacy pipeline.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   Before:
   <img width="1751" height="1319" alt="Screenshot 2026-07-13 at 08 04 09" src="https://github.com/user-attachments/assets/783282a1-e4ae-41db-9468-67420a70377f" />
   
   After:
   <img width="1752" height="1311" alt="Screenshot 2026-07-13 at 07 57 07" src="https://github.com/user-attachments/assets/47fbfb6b-a3c3-4f2a-bb1f-8451121d5c15" />
   
   
   ### TESTING INSTRUCTIONS
   Requires `ENABLE_TEMPLATE_PROCESSING: True`.
   
   1. Create a Time-series Table chart using the "Vehicle Sales" (`cleaned_sales_data`) example dataset, with metric `SUM(price_each)` and one entry in "Time series columns".
   2. Add a filter → Custom SQL → clause **HAVING** →
      `sum(price_each) > {% if filter_values('threshold')|length %} {{ filter_values('threshold')[0] }} {% else %} 0 {% endif %}`
   3. Update the chart.
      - Before: `Invalid SQL clause` error.
      - After: chart renders; the issued query contains `HAVING ((sum(price_each) > 0))`.
   4. Regression check - replace the filter with genuinely invalid SQL (e.g. `sum(price_each) > ) broken (`) and update: the query is still rejected, by the downstream validator (`INVALID_SQL_ERROR` with parse position).
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [x] Required feature flags: `ENABLE_TEMPLATE_PROCESSING`
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(explore): render Jinja before validating legacy chart filters [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #41996:
URL: https://github.com/apache/superset/pull/41996#discussion_r3570159931


##########
superset/utils/core.py:
##########
@@ -1456,7 +1458,9 @@ def split_adhoc_filters_into_base_filters(  # pylint: disable=invalid-name
                     )
             elif expression_type == "SQL":
                 sql_expression = adhoc_filter.get("sqlExpression")
-                sql_expression = sanitize_clause(sql_expression, engine)
+                # keep a trailing line comment from swallowing the " AND " join
+                if sql_expression and "--" in sql_expression:
+                    sql_expression = f"{sql_expression}\n"
                 if clause == "WHERE":

Review Comment:
   **Suggestion:** The new inline-comment handling only detects `--`, so SQL filters using other line-comment syntaxes (notably MySQL `# ...`) are still concatenated with `AND` on the same line and can comment out the rest of the combined predicate. This can silently bypass later filters or generate malformed SQL. Extend the normalization to cover engine-specific line comments (or use the existing parser-based sanitizer after template rendering) before joining clauses. [incorrect condition logic]
   
   <details>
   <summary><b>Severity Level:</b> Major ⚠️</summary>
   
   ```mdx
   ❌ MySQL legacy charts silently ignore additional SQL filters.
   ⚠️ Adhoc filter logic diverges from user expectations with comments.
   ```
   </details>
   <details>
   <summary><b>Steps of Reproduction ✅ </b></summary>
   
   ```mdx
   1. Configure a dataset whose database uses a MySQL-compatible engine (supports "#" line
   comments), and create a legacy viz that uses `BaseViz.process_query_filters()` in
   `superset/viz.py:16-22` which calls `split_adhoc_filters_into_base_filters()` in
   `superset/utils/core.py:31-71`.
   
   2. In the Explore UI for that legacy chart, add two adhoc SQL filters with
   `clause="WHERE"` into `form_data["adhoc_filters"]` (processed by
   `split_adhoc_filters_into_base_filters()` at `superset/utils/core.py:48-69`): the first
   with a trailing "#" comment, e.g. `price > 100 # first filter`, and the second a normal
   predicate, e.g. `quantity > 10`.
   
   3. During query preparation, `split_adhoc_filters_into_base_filters()` enters the
   `expression_type == "SQL"` branch at `superset/utils/core.py:60-68`; because the first
   `sqlExpression` contains "#" but not "--", the newline guard at lines 1462-1464 is not
   applied, and `form_data["where"]` is built at line 69 as `"(price > 100 # first filter)
   AND (quantity > 10)"`, with the " AND " join on the same line after the "#" comment.
   
   4. When this WHERE clause is executed against the MySQL-compatible engine, everything
   after "#" on that line is treated as a comment, so `AND (quantity > 10)` is commented out;
   subsequent validation in `QueryObject._sanitize_filters()` and `sanitize_clause()`
   (`superset/common/query_object.py:60-99`, `superset/sql/parse.py:15-37,2119-2178`) cannot
   resurrect the commented-out predicate, and the query runs with only the first filter
   applied, silently bypassing the second.
   ```
   </details>
   
   [![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=3aa80acf8d174cef83f45b15c5adaeff&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=3aa80acf8d174cef83f45b15c5adaeff&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** superset/utils/core.py
   **Line:** 1462:1464
   **Comment:**
   	*Incorrect Condition Logic: The new inline-comment handling only detects `--`, so SQL filters using other line-comment syntaxes (notably MySQL `# ...`) are still concatenated with `AND` on the same line and can comment out the rest of the combined predicate. This can silently bypass later filters or generate malformed SQL. Extend the normalization to cover engine-specific line comments (or use the existing parser-based sanitizer after template rendering) before joining clauses.
   
   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%2F41996&comment_hash=0a022d9a2a9a18a75bdd7d60775986c060394b19d3cbd440262d0adcd84374e2&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41996&comment_hash=0a022d9a2a9a18a75bdd7d60775986c060394b19d3cbd440262d0adcd84374e2&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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(explore): render Jinja before validating legacy chart filters [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #41996:
URL: https://github.com/apache/superset/pull/41996


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(explore): render Jinja before validating legacy chart filters [superset]

Posted by "massucattoj (via GitHub)" <gi...@apache.org>.
massucattoj commented on code in PR #41996:
URL: https://github.com/apache/superset/pull/41996#discussion_r3570229749


##########
superset/utils/core.py:
##########
@@ -1456,7 +1458,9 @@ def split_adhoc_filters_into_base_filters(  # pylint: disable=invalid-name
                     )
             elif expression_type == "SQL":
                 sql_expression = adhoc_filter.get("sqlExpression")
-                sql_expression = sanitize_clause(sql_expression, engine)
+                # keep a trailing line comment from swallowing the " AND " join
+                if sql_expression and "--" in sql_expression:
+                    sql_expression = f"{sql_expression}\n"
                 if clause == "WHERE":

Review Comment:
   This doesn't produce a silent bypass or malformed SQL reaching the database. The comment always swallows its own clause's closing paren, so the joined predicate is unbalanced and the downstream dialect-aware validator (`_process_sql_expression` -> `sanitize_clause`, which runs after Jinja rendering and is the "parser-based sanitizer" this suggestion refers to) rejects it with a clear `Invalid SQL clause` error. Verified: `sanitize_clause("(a = 1 # comment) AND (b = 2)", "mysql")` raises `QueryClauseValidationException`.



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(explore): render Jinja before validating legacy chart filters [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41996:
URL: https://github.com/apache/superset/pull/41996#issuecomment-4957272536

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(explore): render Jinja before validating legacy chart filters [superset]

Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #41996:
URL: https://github.com/apache/superset/pull/41996#issuecomment-4957286661

   ### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
   
   
   |  Name | Link |
   |:-:|------------------------|
   |<span aria-hidden="true">🔨</span> Latest commit | daa3450780475ff9702a92a95808aaf7eb99c702 |
   |<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6a54c672f23a370008a5c88d |
   |<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-41996--superset-docs-preview.netlify.app](https://deploy-preview-41996--superset-docs-preview.netlify.app) |
   |<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br />![QR Code](https://app.netlify.com/qr-code/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2RlcGxveS1wcmV2aWV3LTQxOTk2LS1zdXBlcnNldC1kb2NzLXByZXZpZXcubmV0bGlmeS5hcHAifQ.krpTPywF0N5vHVJg6eS8SxE9_zucr3cMAdj0rOcEMhI)<br /><br />_Use your smartphone camera to open QR code link._</details> |
   |<span aria-hidden="true">🤖</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#DcoxDoAgDADAv3SWSFSU-AOfUaDEGlSCHTTGv8t2w72Qy7lngRmgAVfw8Gt15Lvd-NhQRU5CRQnvpC4qTJcSdInqDpTT-Syh_hHN4Mepi12P_aS1tmi8tQG-Hw) |
   ---
   <!-- [superset-docs-preview Preview](https://deploy-preview-41996--superset-docs-preview.netlify.app) -->
   _To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(explore): render Jinja before validating legacy chart filters [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #41996:
URL: https://github.com/apache/superset/pull/41996#discussion_r3570118088


##########
tests/unit_tests/core_tests.py:
##########
@@ -55,6 +56,10 @@
     "label": "My Adhoc Column",
     "sqlExpression": "case when foo = 1 then 'foo' else 'bar' end",
 }
+JINJA_HAVING = (
+    "sum(price_each) > {% if filter_values('threshold')|length %} "
+    "{{ filter_values('threshold')[0] }} {% else %} 0 {% endif %}"
+)

Review Comment:
   **Suggestion:** Add an explicit type annotation to this new module-level constant (for example, annotate it as a string). [custom_rule]
   
   **Severity Level:** Minor 🧹
   <details>
   <summary><b>Why it matters? ⭐ </b></summary>
   
   This is a newly added module-level constant assigned a string tuple expression without any type annotation, and the rule requires annotating relevant variables that can be typed.
   </details>
   <details>
   <summary><b>Rule source 📖 </b></summary>
   
   .cursor/rules/dev-standard.mdc (line 28)
   </details>
   
   [![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=0e9595df19904406b0000ca3858298f5&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=0e9595df19904406b0000ca3858298f5&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** tests/unit_tests/core_tests.py
   **Line:** 59:62
   **Comment:**
   	*Custom Rule: Add an explicit type annotation to this new module-level constant (for example, annotate it as a string).
   
   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%2F41996&comment_hash=88e61607ac0cdc02debe193a651917d67862a6a64e6c90cc5dcdd693a2996887&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41996&comment_hash=88e61607ac0cdc02debe193a651917d67862a6a64e6c90cc5dcdd693a2996887&reaction=dislike'>👎</a>



##########
tests/unit_tests/test_viz_query_obj.py:
##########
@@ -0,0 +1,57 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+"""
+Behavioral tests for ``viz.BaseViz.query_obj`` covering free-form filter
+clause handling.
+"""
+
+from typing import Any
+
+from superset import viz
+from superset.connectors.sqla.models import SqlaTable
+from superset.models.core import Database
+
+JINJA_HAVING = (
+    "sum(price_each) > {% if filter_values('threshold')|length %} "
+    "{{ filter_values('threshold')[0] }} {% else %} 0 {% endif %}"
+)
+
+
+def _viz(form_data: dict[str, Any]) -> viz.BaseViz:
+    database = Database(database_name="d", sqlalchemy_uri="sqlite://")
+    datasource = SqlaTable(
+        table_name="t",
+        columns=[],
+        metrics=[],
+        main_dttm_col=None,
+        database=database,
+    )
+    return viz.BaseViz(datasource=datasource, form_data=form_data)
+
+
+def test_query_obj_preserves_jinja_in_freeform_having():

Review Comment:
   **Suggestion:** Add an explicit return type annotation to this new test function to comply with the project’s Python type hint requirement. [custom_rule]
   
   **Severity Level:** Minor 🧹
   <details>
   <summary><b>Why it matters? ⭐ </b></summary>
   
   This is newly added Python code and the test function lacks an explicit return type annotation. Under the project rule requiring type hints on functions/methods that can be annotated, the missing `-> None` is a real violation.
   </details>
   <details>
   <summary><b>Rule source 📖 </b></summary>
   
   .cursor/rules/dev-standard.mdc (line 28)
   </details>
   
   [![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=bf2d53de732148328295b6ddb3bfeb87&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=bf2d53de732148328295b6ddb3bfeb87&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** tests/unit_tests/test_viz_query_obj.py
   **Line:** 46:46
   **Comment:**
   	*Custom Rule: Add an explicit return type annotation to this new test function to comply with the project’s Python type hint requirement.
   
   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%2F41996&comment_hash=398d4cf3594e914d8fc98b8d7bd0a9a900d85b0d428be165eb2e2c98f519f344&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41996&comment_hash=398d4cf3594e914d8fc98b8d7bd0a9a900d85b0d428be165eb2e2c98f519f344&reaction=dislike'>👎</a>



##########
tests/unit_tests/core_tests.py:
##########
@@ -233,3 +238,61 @@ def test_get_time_filter_status_no_temporal_col():
             }
         ],
     )
+
+
+def test_split_adhoc_filters_joins_sql_expressions():

Review Comment:
   **Suggestion:** Add a return type hint to this new test function signature. [custom_rule]
   
   **Severity Level:** Minor 🧹
   <details>
   <summary><b>Why it matters? ⭐ </b></summary>
   
   This new test function omits a return type annotation, which is a direct violation of the Python type-hint requirement for new or modified functions.
   </details>
   <details>
   <summary><b>Rule source 📖 </b></summary>
   
   .cursor/rules/dev-standard.mdc (line 28)
   </details>
   
   [![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=e30a3a10dd2d43b49dfb5cf4e5d20b5b&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=e30a3a10dd2d43b49dfb5cf4e5d20b5b&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** tests/unit_tests/core_tests.py
   **Line:** 243:243
   **Comment:**
   	*Custom Rule: Add a return type hint to this new test function signature.
   
   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%2F41996&comment_hash=aac6995723ecdd70d159f022bcd2671a93cee0d1429b803c184e84f13dc2e430&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41996&comment_hash=aac6995723ecdd70d159f022bcd2671a93cee0d1429b803c184e84f13dc2e430&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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(explore): render Jinja before validating legacy chart filters [superset]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #41996:
URL: https://github.com/apache/superset/pull/41996#issuecomment-4957313468

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/41996?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `0%` with `2 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 56.16%. Comparing base ([`e403d9b`](https://app.codecov.io/gh/apache/superset/commit/e403d9b07424daa02ac88925a71e91e2f8b75314?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`daa3450`](https://app.codecov.io/gh/apache/superset/commit/daa3450780475ff9702a92a95808aaf7eb99c702?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 14 commits behind head on master.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/41996?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [superset/utils/core.py](https://app.codecov.io/gh/apache/superset/pull/41996?src=pr&el=tree&filepath=superset%2Futils%2Fcore.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvdXRpbHMvY29yZS5weQ==) | 0.00% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/41996?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #41996      +/-   ##
   ==========================================
   - Coverage   65.04%   56.16%   -8.89%     
   ==========================================
     Files        2742     2742              
     Lines      153425   153418       -7     
     Branches    35206    35204       -2     
   ==========================================
   - Hits        99792    86162   -13630     
   - Misses      51726    66430   +14704     
   + Partials     1907      826    -1081     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/41996/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [hive](https://app.codecov.io/gh/apache/superset/pull/41996/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `39.07% <0.00%> (+<0.01%)` | :arrow_up: |
   | [mysql](https://app.codecov.io/gh/apache/superset/pull/41996/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [postgres](https://app.codecov.io/gh/apache/superset/pull/41996/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [presto](https://app.codecov.io/gh/apache/superset/pull/41996/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `41.06% <0.00%> (+<0.01%)` | :arrow_up: |
   | [python](https://app.codecov.io/gh/apache/superset/pull/41996/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `41.12% <0.00%> (-18.29%)` | :arrow_down: |
   | [sqlite](https://app.codecov.io/gh/apache/superset/pull/41996/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [unit](https://app.codecov.io/gh/apache/superset/pull/41996/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/41996?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org