[ https://issues.apache.org/jira/browse/SPARK-51419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17934234#comment-17934234 ]
Max Gekk commented on SPARK-51419: ---------------------------------- > we will have syntax as exactly as " TIME'12:13:14' ? [~senthh] Correct. The PR https://github.com/apache/spark/pull/50228 supported such syntax > And we need to modify hour function DateTimeUtils.getHour. is my > understanding correct? You need to modify the Hour expression, and call different functions from DateTimeUtils for TIMESTAMP (for now it is getHours) and for TIME (new function in DateTimeUtils). > Get hour of time > ---------------- > > Key: SPARK-51419 > URL: https://issues.apache.org/jira/browse/SPARK-51419 > Project: Spark > Issue Type: Sub-task > Components: SQL > Affects Versions: 4.1.0 > Reporter: Max Gekk > Priority: Minor > Labels: starter > > Modify the hour() function to return the hour component of a time. > h4. Syntax > {code:sql} > hour(expr) > {code} > h4. Arguments > expr: A TIME expression. > h4. Returns > An INTEGER. > h4. Examples > {code:sql} > > SELECT hour(TIME'12:13:14'); > 12 > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org