You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "MaxGekk (via GitHub)" <gi...@apache.org> on 2023/08/10 17:57:10 UTC

[GitHub] [spark] MaxGekk opened a new pull request, #42435: [WIP][SQL] Add the alias `TIMEDIFF` for `TIMESTAMPDIFF`

MaxGekk opened a new pull request, #42435:
URL: https://github.com/apache/spark/pull/42435

   ### What changes were proposed in this pull request?
   In the PR, I propose to extend the rules of `primaryExpression` in `SqlBaseParser.g4`, and one more function `TIMEDIFF` which accepts 3-args in the same way as the existing expressions `TIMESTAMPDIFF`.
   
   ### Why are the changes needed?
   To achieve feature parity w/ other system and make the migration to Spark SQL easier from such systems:
   1. Snowflake: https://docs.snowflake.com/en/sql-reference/functions/timediff
   2. MySQL/MariaDB: https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_timediff
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   By running the existing test suites:
   ```
   $ PYSPARK_PYTHON=python3 build/sbt "sql/testOnly org.apache.spark.sql.SQLQueryTestSuite"
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] MaxGekk closed pull request #42435: [SPARK-44778][SQL] Add the alias `TIMEDIFF` for `TIMESTAMPDIFF`

Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk closed pull request #42435: [SPARK-44778][SQL] Add the alias `TIMEDIFF` for `TIMESTAMPDIFF`
URL: https://github.com/apache/spark/pull/42435


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] MaxGekk commented on pull request #42435: [SPARK-44778][SQL] Add the alias `TIMEDIFF` for `TIMESTAMPDIFF`

Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk commented on PR #42435:
URL: https://github.com/apache/spark/pull/42435#issuecomment-1675729149

   Merging to master. Thank you, @HyukjinKwon for review.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org