Skip to content
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-796238 Release 1.4.0 Preparation #796

Merged
merged 11 commits into from
Apr 24, 2023
Merged

SNOW-796238 Release 1.4.0 Preparation #796

merged 11 commits into from
Apr 24, 2023

Conversation

sfc-gh-kdama
Copy link
Collaborator

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 #NNNN

  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-kdama
Copy link
Collaborator Author

1194357 (HEAD -> release-v1.4.0, origin/release-v1.4.0) SNOW-796238 Release 1.4.0 Preparation
fec83cb (origin/main, main) SNOW-754092: update flaky doc tests of async job (#794)
3e78b34 SNOW-754127 Support binding variable in session.sql (#778)
c0ba6e6 SNOW-797214 Fix flaky test for table.py (#793)
0d2c041 SNOW-781049: update test to be compatible with stored proc (#788)
3ccdf44 SNOW-781049: support dot in table name (#772)
5f10046 Skip tests that create session in sp (#787)
fece2ed SNOW-763159 Fix is_sql_select_statement (#779)
fc73bfe SNOW-535070 Adds support for dynamic tables (#767)
dbe3e86 SNOW-787955: resolve namespace collision for udf/stored proc imports (#784)
e14ba15 Fix bug in error message (#780)
b666bfa SNOW-762114: Provide an API to get multiple active sessions (#776)
c5cbea9 Snowpark_extensions_for_functions (#749)
6a50305 SNOW-749406: Add sample code to functions - batch 1 (#765)
8e68523 Refactor select_statement and (stacked PR) flatten select after filter/orderby (#768)
6de4fa2 add telemetry to explode (#774)
0127f57 Add statement params to dataframe as a property (#755)
eade457 Set pre-commit default language version to Python3.8 (#766)
3bcdb5c SNOW-749414 adding code examples (#734)
a376a04 SNOW-704112 explode related methods (#762)
f394fea SNOW-706838 skip upload on content match (#753)

@sfc-gh-kdama
Copy link
Collaborator Author

  • Added support for session.getOrCreate
  • Added support for functions.array_distinct
  • Added support for alias Column.getField
  • Added support for functions.regexp_extract
  • Added support for functions.struct
  • Added support for functions.daydiff which is compatible with spark datediff
  • Added support for functions.date_add and functions.date_sub to ease common day add/substract operations
  • Added support for functions.format_number
  • Added support for functions.bround
  • Added support for explode function in snowflake.snowpark.functions.
  • Added parameter skip_upload_on_content_match when creating UDF, UDTF and Stored Procedure using register_from_file to skip file uploads to stage in case the files are already present on stage.
  • Added support for DataFrame.save_as_table method to take table name containing dots.
  • Flattened generated SQL when DataFrame.filter() or DataFrame.order_by() is followed by a projection statement (e.g. DataFrame.select(), DataFrame.with_column()).
  • Added support for creating Dynamic Tables (in Private Preview) using Dataframe.create_or_replace_dynamic_table
  • Added an optional argument params in session.sql() to support binding variables. Note that this is not supported in stored procedure yet.

Bug Fixes

  • Fixed a bug with strtok_to_array when a delimiter was passed it was throwing an exception
  • Fixed a bug where anonymous procedures were identified as select statement
    @sfc-gh-mabrennan Please review the release notes

@codecov
Copy link

codecov bot commented Apr 20, 2023

Codecov Report

Merging #796 (2ccc229) into main (c252967) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #796   +/-   ##
=======================================
  Coverage   98.09%   98.09%           
=======================================
  Files          49       49           
  Lines        8387     8387           
  Branches     1423     1423           
=======================================
  Hits         8227     8227           
  Misses         92       92           
  Partials       68       68           
Impacted Files Coverage Δ
src/snowflake/snowpark/version.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Collaborator

@sfc-gh-mabrennan sfc-gh-mabrennan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made some suggestions. Thanks.

CHANGELOG.md Outdated
Comment on lines 8 to 14
- Added support for `functions.array_distinct`.
- Added support for alias `Column.getField`.
- Added support for `functions.regexp_extract`.
- Added support for `functions.struct`.
- Added support for `functions.daydiff` which is compatible with Spark datediff.
- Added support for `functions.date_add` and `functions.date_sub` to make add and subtract operations easier.
- Added support for `functions.format_number`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No strong opinion but I wonder if we should group the newly introduced functions under one bullet point and add sub-bullets for ones that needs explanation. For example:

- Added support for new functions:
  - `functions.daydiff` which is compatible with Spark datediff.
  - `functions.date_add` and `functions.date_sub` to make add and subtract operations easier.
  - Other functions

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm working on it

CHANGELOG.md Outdated
- Added support for `functions.daydiff` which is compatible with Spark datediff.
- Added support for `functions.date_add` and `functions.date_sub` to make add and subtract operations easier.
- Added support for `functions.format_number`.
- Added support for `functions.bround`.
- Added support for `explode` function in `snowflake.snowpark.functions`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also another function so should be the same format I think.

Copy link
Collaborator

@sfc-gh-mabrennan sfc-gh-mabrennan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

CHANGELOG.md Outdated
- Fixed a bug where anonymous procedures were identified as select statement
- Fixed a bug with `session.add_import` when the module has the same namespace with other dependencies
- Fixed a bug in `strtok_to_array` where an exception was thrown when a delimiter was passed in.
- Fixed a bug where anonymous procedures were identified as select statements.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not mention this one as anonymous procedure is not exposed as a public API yet.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point. I'll remove it.

@sfc-gh-aalam sfc-gh-aalam merged commit 1d6973e into main Apr 24, 2023
@sfc-gh-aalam sfc-gh-aalam deleted the release-v1.4.0 branch April 24, 2023 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants