-
Notifications
You must be signed in to change notification settings - Fork 169
SNOW-1812881: Division broken #543
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workingstatus-fixed_awaiting_releaseThe issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector.The issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector.status-triage_doneInitial triage done, will be further handled by the driver teamInitial triage done, will be further handled by the driver team
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingstatus-fixed_awaiting_releaseThe issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector.The issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector.status-triage_doneInitial triage done, will be further handled by the driver teamInitial triage done, will be further handled by the driver team
Type
Fields
Give feedbackNo fields configured for issues without a type.
Please answer these questions before submitting your issue. Thanks!
macOS-14.7.1-arm64-arm-64bit(but irrelevant)pip freeze)? The relevant ones are:sqlalchemy 2.0.36andsnowflake-sqlalchemy 1.6.1a / band it does not compile correctly.This prints
a / CAST(sqrt(b) AS NUMERIC). However, the cast in the denominator should not happen, and this cast leads to wrong results (!).The fix is to set
div_is_floordiv = FalseinSnowflakeDialect, see e.g. this as a test:BTW: fixing
div_is_floordivalso fixes the integer division operator, i.e.//. Right now, this is also wrong:currently prints "a / b". Using
FixedDialectfrom above, it correctly printsFLOOR(a / b).