You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/08/11 19:10:25 UTC

[GitHub] [spark] MaxGekk commented on a change in pull request #25410: [SPARK-28690][SQL] Add the `date_part` function for timestamps and dates

MaxGekk commented on a change in pull request #25410: [SPARK-28690][SQL] Add the `date_part` function for timestamps and dates
URL: https://github.com/apache/spark/pull/25410#discussion_r312750897
 
 

 ##########
 File path: sql/core/src/test/resources/sql-tests/inputs/pgSQL/timestamp.sql
 ##########
 @@ -187,12 +187,11 @@ SELECT '' AS date_trunc_week, date_trunc( 'week', timestamp '2004-02-29 15:44:17
 --   WHERE d1 BETWEEN timestamp '1902-01-01'
 --    AND timestamp '2038-01-01';
 
--- [SPARK-28420] Date/Time Functions: date_part
--- SELECT '' AS "54", d1 as "timestamp",
---    date_part( 'year', d1) AS year, date_part( 'month', d1) AS month,
---    date_part( 'day', d1) AS day, date_part( 'hour', d1) AS hour,
---    date_part( 'minute', d1) AS minute, date_part( 'second', d1) AS second
---    FROM TIMESTAMP_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
+SELECT '' AS `54`, d1 as `timestamp`,
+    date_part( 'year', d1) AS `year`, date_part( 'month', d1) AS `month`,
+    date_part( 'day', d1) AS `day`, date_part( 'hour', d1) AS `hour`,
+    date_part( 'minute', d1) AS `minute`, date_part( 'second', d1) AS `second`
+    FROM TIMESTAMP_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
 
 -- SELECT '' AS "54", d1 as "timestamp",
 --    date_part( 'quarter', d1) AS quarter, date_part( 'msec', d1) AS msec,
 
 Review comment:
   milliseconds and microseconds will be supported by https://github.com/apache/spark/pull/25408

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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