Github user chenghao-intel commented on a diff in the pull request:
https://github.com/apache/spark/pull/7175#discussion_r33754494
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/misc.scala
---
@@ -174,8 +171,7 @@ case class Sha1(child: Expression) extends
UnaryExpression with AutoCastInputTyp
* A function that computes a cyclic redundancy check value and returns it
as a bigint
* For input of type [[BinaryType]]
*/
-case class Crc32(child: Expression)
- extends UnaryExpression with AutoCastInputTypes {
+case class Crc32(child: Expression) extends UnaryExpression with
ExpectsInputTypes {
--- End diff --
I mean we'd better leave the casting (StringType -> BinaryType) to be done
within the UDF `Crc32` itself, not via the generic auto casting rule. From the
user perspective, the UDF Crc32 will support both `StringType` and `BinaryType`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]