snowpark-python
snowpark-python copied to clipboard
Fix Local Testing implementation of to_date and to_char with corrected type hints
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 #NNNN
-
Fill out the following pre-review checklist:
- [ ] I am adding a new automated test(s) to verify correctness of my new code
- [ ] I am adding new logging messages
- [ ] I am adding a new telemetry message
- [ ] I am adding new credentials
- [ ] I am adding a new dependency
-
Please describe how your code solves the related issue.
Local Testing implementation of the built-in SQL functions uses type hints to determine whether a value should be passed as a column or a single literal value.
to_dateandto_charhad incorrect type hints before (essentially,formatcould also be a column of string instead of a single literal string), the fixes in #1187 caused regression in Local Testing implementation ofmock_to_dateandmock_to_char. This PR fixes that.