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

SNOW-1183322: [Local Testing] Add support for registering sprocs

Open sfc-gh-jrose opened this issue 1 year ago • 2 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 #1183322

  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.

    Please write a short description of how your code change solves the related issue.

sfc-gh-jrose avatar Mar 26 '24 19:03 sfc-gh-jrose

Can we enable more tests in tests/integ/test_stored_procedure.py like test_type_hints?

sfc-gh-stan avatar Apr 04 '24 22:04 sfc-gh-stan

I've enabled all the tests that look relevant to local testing. There's several more tests related to imports and loading from file that can't be enabled yet. Turning on those tests revealed a couple of gaps.

  1. session.call didn't work previously, but should now.
  2. Calling a sproc with a nested column expression that returns a single value appears to be supported in live so I've reverted the refactor I made to add support for calling calculate_expression back. I've added a comment so that it's a little more understandable.

In order to implement tests 1:1 I also implemented functions.sqrt and functions.pow. They are trivial so shouldn't expand the scope of this PR by much.

sfc-gh-jrose avatar Apr 09 '24 18:04 sfc-gh-jrose

LGTM overall, had a couple of questions and comments.

sfc-gh-stan avatar Apr 12 '24 00:04 sfc-gh-stan

I noticed the oob telemetry test is flaky these days thus blocking the merge gate. I created a PR to fix the flakiness: https://github.com/snowflakedb/snowpark-python/pull/1382

sfc-gh-aling avatar Apr 12 '24 00:04 sfc-gh-aling