suraj-mandal commented on code in PR #33230:
URL: https://github.com/apache/superset/pull/33230#discussion_r2058889374


##########
superset/connectors/sqla/models.py:
##########
@@ -553,7 +560,11 @@ def handle_single_value(value: FilterValue | None) -> 
FilterValue | None:
                 ):
                     # For backwards compatibility and edge cases
                     # where a column data type might have changed
-                    return utils.cast_to_num(value)
+                    try:
+                        return utils.cast_to_num(float(value))
+                    except ValueError:
+                        logger.error(f"Unable to cast value {value} to num")
+                        return utils.cast_to_num(value)

Review Comment:
   Here is the snippet of the code:
   
   ```python
     # where a column data type might have changed
                       try:
                           value = float(value)
                       except ValueError:
                           logger.error(f"Unable to cast value {value} to num")
                       return utils.cast_to_num(value)
   ```



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