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


   ### What changes were proposed in this pull request?
   In the PR, I propose to add new function `TIMESTAMPDIFF` with the following 
parameters:
   1. `unit` - sthis indicates the units of the difference between the given 
timestamps. Supported string values of `unit` are (case insensitive):
      - YEAR
      - QUARTER
      - MONTH
      - WEEK
      - DAY, DAYOFYEAR
      - HOUR
      - MINUTE
      - SECOND
      - MILLISECOND
      - MICROSECOND
   2. `timestampStart` - A timestamp which the expression subtracts from 
`timestampEnd`.
   3. `timestampEnd` - A timestamp from which the expression subtracts 
`timestampStart`.
   
   ### Why are the changes needed?
   1. To make the migration process from other systems to Spark SQL easier.
   2. To achieve feature parity with other DBMSs.
   
   ### Does this PR introduce _any_ user-facing change?
   No. This is new feature.
   
   ### How was this patch tested?
   By running new tests:
   ```
   $ build/sbt "sql/test:testOnly 
org.apache.spark.sql.expressions.ExpressionInfoSuite"
   $ build/sbt "sql/testOnly *ExpressionsSchemaSuite"
   ```
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to