MaxGekk commented on issue #25981: [SPARK-28420][SQL] Support the `INTERVAL` type in `date_part()` URL: https://github.com/apache/spark/pull/25981#issuecomment-538328602 > Sorry, but it seems that we had better finalize #25998 first. Could you clarify what is the finalize, please. Using this https://github.com/apache/spark/pull/25998/files#diff-da60f07e1826788aaeb07f295fae4b8aR69-R70 or 31 days per months? I am still confused, sorry. There are 3 options: - Using precise correct constant 365.2425 days per year. - Using the same constant as other DBMS having the same feature like we agreed for `months_between`. Similarly, we should use 365.25 days per year here as PostgreSQL does. - or as @cloud-fan proposed 372 days per year (31 days per months which I will have to use there https://github.com/apache/spark/pull/25981/files#diff-eba257f41b49f470321579875f054f00R88). ... but I cannot agree with this approach especially here where getting seconds with fractional part will have significant difference with correct value and Postgres value see https://github.com/apache/spark/pull/25998#discussion_r331360446
---------------------------------------------------------------- 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]
