SNOW-3570860 move to sa 20#690
Conversation
| isolation_level: Optional[str] = SnowflakeIsolationLevel.READ_COMMITTED.value, | ||
| enable_decfloat: bool = False, | ||
| case_sensitive_identifiers: bool = False, | ||
| cache_column_metadata: bool = False, |
There was a problem hiding this comment.
Q (for potential future PRs): Do we have other flags that could be removed in favor of better defaults?
There was a problem hiding this comment.
This is open for discussions before RC release.
|
|
||
| class TrueDivTest(_TrueDivTest): | ||
| @pytest.mark.skip("`//` not supported") | ||
| def test_floordiv_integer_bound(self, connection): |
There was a problem hiding this comment.
Q: Just so I understand correctly, we're skipping those as we have our own tests that work with the dialect-level flag, so we don't need the tests provided by SQA for truediv, correct?
There was a problem hiding this comment.
Good catch — the skip reason is incorrect. SA compiles // to FLOOR(x / y), not a SQL // operator, so "Snowflake does not provide //" is wrong. Snowflake supports FLOOR() fine.
The real issue is force_div_is_floordiv=True (the current default):
- truediv
/tests expect15/10 = 1.5— these pass becausevisit_truediv_binarydelegates to SA's base which emits15 / CAST(10 AS NUMERIC) = 1.5 - floordiv
//tests expect15//10 = 1— these would also pass viaFLOOR(15 / 10) = 1, just with aPendingDeprecationWarning
So the skips are likely unnecessary. However, this is tied to the open force_div_is_floordiv discussion — if we flip its default to False in v2.0.0 (which I'm leaning towards given we're doing a major version bump), the warning disappears and the entire TrueDivTest subclass can be dropped. Leaving this pending until Q2 is resolved.
c322bec to
55fe4ae
Compare
Please answer these questions before submitting your pull requests. Thanks!
What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes #SNOW-3570860
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.