zhangbutao commented on code in PR #90:
URL: https://github.com/apache/hive-site/pull/90#discussion_r2752408871
##########
content/docs/latest/language/languagemanual-udf.md:
##########
@@ -223,12 +220,7 @@ The following built-in date functions are supported in
Hive:
| int | minute(string date) | Returns the minute of the timestamp. |
| int | second(string date) | Returns the second of the timestamp. |
| int | weekofyear(string date) | Returns the week number of a timestamp
string: weekofyear("1970-11-01 00:00:00") = 44, weekofyear("1970-11-01") = 44. |
-| int | extract(field FROM source) | Retrieve fields such as days or hours
from source (as of Hive
[2.2.0](https://issues.apache.org/jira/browse/HIVE-14579)). Source must be a
date, timestamp, interval or a string that can be converted into either a date
or timestamp. Supported fields include: day, dayofweek, hour, minute, month,
quarter, second, week and year.Examples:1. select extract(month from
"2016-10-20") results in 10.
-2. select extract(hour from "2016-10-20 05:06:07") results in 5.
-3. select extract(dayofweek from "2016-10-20 05:06:07") results in 5.
-4. select extract(month from interval '1-3' year to month) results in 3.
-5. select extract(minute from interval '3 12:20:30' day to second) results in
20.
- |
+| int | extract(field FROM source) | Retrieve fields such as days or hours
from source (as of Hive
[2.2.0](https://issues.apache.org/jira/browse/HIVE-14579)). Source must be a
date, timestamp, interval or a string that can be converted into either a date
or timestamp. Supported fields include: day, dayofweek, hour, minute, month,
quarter, second, week and year. Examples: ① select extract(month from
"2016-10-20") results in 10. ② select extract(hour from "2016-10-20 05:06:07")
results in 5. ③ select extract(dayofweek from "2016-10-20 05:06:07") results in
5. ④ select extract(month from interval '1-3' year to month) results in 3. ⑤
select extract(minute from interval '3 12:20:30' day to second) results in 20. |
Review Comment:
Can we display the content like wiki doc:
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF
<img width="2410" height="446" alt="Image"
src="https://github.com/user-attachments/assets/4667d5cc-4404-487c-b9a4-cbc8906a4f5e"
/>
You can run hive-site using: hugo server -D, then test your 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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]