-
Notifications
You must be signed in to change notification settings - Fork 112
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-1489960, SNOW-1491199] Snowpark python API client-side changes for IR encoding to protobuf #2674
base: main
Are you sure you want to change the base?
Conversation
@@ -81,6 +81,8 @@ passenv = | |||
SF_REGRESS_LOGS | |||
; Github Actions provided environmental variables |
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.
@sfc-gh-azhan this here changed.
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.
duplicate lines in 84 85
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.
To resolve what should I do? I think both are here because of windows/ubuntu differences.
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.
leaving for now as is, we can do follow up PR to resolve/improve.
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.
why? Such a simple change
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 just need to move line 84 and 85.
…me (#2678) SNOW-1787415 Fix udf, udaf, sproc functions with registered object name
@@ -19,6 +19,7 @@ | |||
- `keyType`: keys of the map | |||
- `valueType`: values of the map | |||
- Added support for `include_nulls` argument in `DataFrame.unpivot`. | |||
- Added client-side thin-client mode which can be enabled with `session.ast_enabled=True` (default: `False`). |
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.
enable ast does not enable a thin client mode right? We still send sql query to the server.
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.
change to
Added parameter
ast_enabled to session for internal usage (default: False)
def __init__( | ||
self, | ||
session: "snowflake.snowpark.session.Session", | ||
include_failures: bool = False, |
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.
add comment to talk about what include_failures
does
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.
@sfc-gh-oplaton can we add a comment here?
self._session._ast_batch.eval(repr) | ||
|
||
# Flush the AST and encode it as part of the query. | ||
_, kwargs["_dataframe_ast"] = self._session._ast_batch.flush() |
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.
Can we create a constant for "_dataframe_ast"
?
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.
add DATAFRAME_AST_PARAMETER="_dataframe_ast"
@@ -1 +1,2 @@ | |||
parameters*.py | |||
cassettes/ |
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.
curious what code generate this?
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.
remove this.
] | ||
|
||
|
||
def _process_response_recording(response): |
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.
where do we use _process_response_recording?
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.
remove this. double-check this file.
@@ -597,7 +597,7 @@ def test_to_datetime_pydatetime(self): | |||
@pytest.mark.parametrize( | |||
"dt", [np.datetime64("2000-01-01"), np.datetime64("2000-01-02")] | |||
) | |||
@sql_count_checker(query_count=1) | |||
@sql_count_checker(query_count=1, join_count=0) |
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.
shouldn't change this file
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.
revert this change.
Add coverage to AST gates
|
Main commit for SNOW-1489960 bringing in changes to encode Snowpark python API to protobuf. A detailed commit history can be found in https://github.com/snowflakedb/snowpark-python/tree/ls-SNOW-1491199-merge-phase0-server-side.
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
Please write a short description of how your code change solves the related issue.
Co-authored-by: Arthur Zwiegincew [email protected]
Co-authored-by: Ovidiu Platon [email protected]
Co-authored-by: Hemit Shah [email protected]
Co-authored-by: Varnika Budati [email protected]
Co-authored-by: Eric Vandenberg [email protected]
Co-authored-by: Andong Zhan [email protected]