snowflakedb / snowflakedb/snowpark-python
SNOW-742421 daydiff method to match Spark datediff method
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 341
- Forks
- 155
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 27
Description
What is the current behavior?
The snowflake datediff has been built to match the snowflake platform https://docs.snowflake.com/en/sql-reference/functions/datediff
The spark datediff is different from snowflake datediff this can imply some manual changes. Spark diff is more of a diference in number of dates and the order or parameters is different.
What is the desired behavior?
A new method ‘daydiff’ is provided and this method provides higher compatibility with the previous method and spark make it a simple replacement.
How would this improve snowflake-snowpark-python?
It accelerates and simplifies the transition for people coming from spark.
References, Other Background
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the Snowpark Python API at the existing datediff method and compare its behavior with Spark's datediff and the requested daydiff interface. Check the referenced Snowflake datediff semantics before designing the replacement. Done means daydiff provides Spark-compatible date differences and supports a straightforward transition from Spark.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, spark
- Domain
- data-engineering
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100