Skip to content

Commit

Permalink
[SNOW-1843885] Fix error caused by snowpark_round (#2708)
Browse files Browse the repository at this point in the history
1. Which Jira issue is this PR addressing? Make sure that there is an
accompanying issue to your PR.

   Fixes SNOW-1843885.

2. Fill out the following pre-review checklist:

- [ ] I am adding a new automated test(s) to verify correctness of my
new code
- [ ] If this test skips Local Testing mode, I'm requesting review from
@snowflakedb/local-testing
   - [ ] I am adding new logging messages
   - [ ] I am adding a new telemetry message
   - [ ] I am adding new credentials
   - [ ] I am adding a new dependency
- [ ] If this is a new feature/behavior, I'm adding the Local Testing
parity changes.
- [x] I acknowledge that I have ensured my changes to be thread-safe.
Follow the link for more information: [Thread-safe Developer
Guidelines](https://github.com/snowflakedb/snowpark-python/blob/main/CONTRIBUTING.md#thread-safe-development)

3. Please describe how your code solves the related issue.

Fixes AST error caused by `snowpark_round` where due to aliasing
`session.ast_enabled` was not properly propagated.
  • Loading branch information
sfc-gh-lspiegelberg authored Dec 3, 2024
1 parent 8ad96ca commit dc83b57
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7955,7 +7955,8 @@ def _apply_with_udtf_and_dynamic_pivot_along_axis_1(
partition_expression = (
snowpark_round(
col(row_position_snowflake_quoted_identifier)
/ pandas_lit(partition_size)
/ pandas_lit(partition_size),
_emit_ast=self._modin_frame.ordered_dataframe.session.ast_enabled,
)
).as_(partition_identifier)
udtf_dataframe = new_internal_df.ordered_dataframe.select(
Expand Down

0 comments on commit dc83b57

Please sign in to comment.