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


##########
superset/semantic_layers/models.py:
##########
@@ -388,6 +389,20 @@ def get_query_result(self, query_object: QueryObject) -> 
QueryResult:
         security_manager.raise_for_unsupported_guest_rls(self)
         result: QueryResult = get_results(query_object)
         if query_object.post_processing and not result.df.empty:
+            # Nullable integer metrics arrive as exact Python ints; 
calculations
+            # need numbers, as for SQL datasets. Plain chart data stays exact.
+            metric_names: list[str] = query_object.metric_names
+            df_columns_to_num(
+                result.df,
+                {
+                    *metric_names,
+                    *(
+                        TIME_COMPARISON.join([metric, offset])
+                        for metric in metric_names
+                        for offset in query_object.time_offsets
+                    ),
+                },
+            )

Review Comment:
   ✅ **Customized review instruction saved!**
   
   **Instruction:**
   > Do not flag dimension columns left unconverted in contribution handling; 
contributions only support metric labels, and dimensions are intentionally kept 
exact.
   
   **Applied to:**
     - `superset/semantic_layers/models.py`
   
   ---
   💡 *To manage or update this instruction, visit: [CodeAnt AI 
Settings](https://app.codeant.ai/org/settings/learnings)*



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