-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNOW-828211 Support registering vectorized UDTF #940
Conversation
Codecov Report
@@ Coverage Diff @@
## main #940 +/- ##
==========================================
+ Coverage 98.46% 98.52% +0.05%
==========================================
Files 51 50 -1
Lines 9079 9019 -60
Branches 1626 1621 -5
==========================================
- Hits 8940 8886 -54
+ Misses 55 52 -3
+ Partials 84 81 -3
... and 4 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are gonna have some merge conflict fun :)
src/snowflake/snowpark/udtf.py
Outdated
output_schema, Iterable | ||
): # with column names instead of StructType. Read type hints to infer column types. | ||
# can we refactor this block to be in process_registration_inputs? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe add a TODO?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I refactored already, lemme remove this comment haha.
@@ -34,6 +38,36 @@ | |||
pytestmark = pytest.mark.udf | |||
|
|||
|
|||
@pytest.fixture(scope="module") | |||
def vectorized_udtf_test_table(session) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might need to enable the vectorized udtf in the stored proc test file by adding an alter session
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter is internal though. Should we set it using alter session
or on the account level?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. I mean you could add the alter session
in this test file.
9d2a30c
to
03123d7
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 #NNNN
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
PandasDataFrameType
asoutput_schema
or (2) specifyPandasDataFrame
as type hints or (3) specifypd.DataFrame
as type hints and aStructType(List[StructField])
asoutput_schema
.