MaxGekk commented on issue #25981: [SPARK-28420][SQL] Support the `INTERVAL` 
type in `date_part()`
URL: https://github.com/apache/spark/pull/25981#issuecomment-543048612
 
 
   > There is one question not addressed: 
https://github.com/apache/spark/pull/25981/files#r332578044
   
   Github didn't allow me to put my answer under @srowen question, and I had to 
continue discussion on the main page: 
https://github.com/apache/spark/pull/25981#issuecomment-539573527
   
   > What's the motivation of this PR?
   
   The motivation is still the same as I wrote in the PR description: _To 
maintain feature parity with PostgreSQL 
(https://www.postgresql.org/docs/11/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT)_
   
   > If it's for pgsql compatibility, let's follow pgsql completely and enable 
it only when dialect=pgsql.
   
   The `DatePart` expressions for dates/timestamps was originally added for 
pgsql compatibility without any flags: 
https://github.com/apache/spark/pull/25410 . This PR extends `DatePart` to 
support the `INTERVAL` type for its parameter. I don't think this should be 
guarded by the dialect flag. If you believe we should hide entire `DatePart` 
under flag than it is out of scope of this PR.
   

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


With regards,
Apache Git Services

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

Reply via email to