varadendrasimha511 commented on issue #33206:
URL: https://github.com/apache/superset/issues/33206#issuecomment-5176214370

   I've opened a PR for this: #42752
   
   Root-caused it further than the earlier attempts (#33222, #33230): the 
   truncation isn't in `cast_to_num` — it happens because SQLAlchemy can 
   infer the bind parameter type from the first value in an `IN (...)` list. 
   When that first value is an `int` and later values are `float`, the 
   floats get silently truncated during query compilation, even though the 
   column itself is correctly typed as `Float`.
   
   Confirmed via:
   - Browser network payload showing the frontend sends full-precision values
   - Debug logging showing values are still correct immediately before 
     `sqla_col.in_(eq)` is called
   - Isolated that only int+float combinations trigger it — pure int lists 
     and pure float lists both work correctly
   
   Fix normalizes mixed int/float values to float only when needed, so it 
   doesn't affect the large-integer-ID precision concern raised in #33230.


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