MrPowers commented on pull request #31073:
URL: https://github.com/apache/spark/pull/31073#issuecomment-756446704


   @zero323 - There is a `make_interval` Postgres function and [make_interval 
is already part of the public SQL 
API](https://spark.apache.org/docs/latest/api/sql/index.html#make_interval).  
There are also `make_date` and `make_timestamp` SQL functions.  There's a good 
argument to keep the function name as is for consistency.
   
   I see your point and think `time_interval` is more descriptive.  It seems 
like most of the datetime function names are just copied from Databases (e.g. 
`trunc` is from Oracle, `date_sub` is from MySQL, `datediff` is from SQL 
Server).  I'd prefer using descriptive names to avoid API inconsistencies like 
having some method names using snake_case and others using all lowercase.  But 
it seems like the precedent is to mimic the names used in databases.


----------------------------------------------------------------
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.

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