SNOW-1183322: [Local Testing] Add support for registering sprocs
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 #1183322
-
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.
Please write a short description of how your code change solves the related issue.
Can we enable more tests in tests/integ/test_stored_procedure.py like test_type_hints?
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.
- session.call didn't work previously, but should now.
- 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_expressionback. 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.
LGTM overall, had a couple of questions and comments.
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