snowpark-python icon indicating copy to clipboard operation
snowpark-python copied to clipboard

Fix Local Testing implementation of to_date and to_char with corrected type hints

Open sfc-gh-stan opened this issue 2 years ago • 0 comments

Please answer these questions before submitting your pull requests. Thanks!

  1. What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Fixes #NNNN

  2. 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
  3. 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_date and to_char had incorrect type hints before (essentially, format could also be a column of string instead of a single literal string), the fixes in #1187 caused regression in Local Testing implementation of mock_to_date and mock_to_char. This PR fixes that.

sfc-gh-stan avatar Feb 06 '24 22:02 sfc-gh-stan