makinyemi commented on code in PR #73: URL: https://github.com/apache/hive-site/pull/73#discussion_r2501914226
########## content/docs/latest/language/hive-udfs.md: ########## @@ -267,8 +267,8 @@ The following built-in type conversion functions are supported in Hive. | Return Type | Name(Signature) | Description | Source code | | --- | --- | --- | --- | | **binary** | ``` binary(string\|binary) ``` | Casts the parameter into a binary. | [GenericUDFBaseBinary](https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBaseBinary.java) | -| **Expected "=" to follow "type"** | ``` cast(expr as <type>) ``` | Converts the results of the expression expr to \<type\>. For example, cast('1' as bigint) will convert the string '1' to its integral representation. A null is returned if the conversion does not succeed. If cast(expr as boolean) Hive returns true for a non-empty string. | [GenericUDFCastFormat](https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFCastFormat.java) | - +| **Expected "=" to follow "type"** | ``` cast(expr as <type>) ``` | Converts the results of the expression expr to \<type\>. For example, cast('1' as bigint) will convert the string '1' to its integral representation. A null is returned if the conversion does not succeed. If cast(expr as boolean) Hive returns true for a non-empty string. | | +| **string or date** | ``` CAST( <column> AS <type> FORMAT <pattern>) ``` | Converts a datetime value to string or string-type value to datetime based on the format pattern specified. | [GenericUDFCastFormat](https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFCastFormat.java) | Review Comment: So if i understand the second bullet point correctly: change the `<column>` to expr? Just as in the regular cast(expr as <type> correct? -- 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]
