gengliangwang commented on code in PR #37462:
URL: https://github.com/apache/spark/pull/37462#discussion_r942093531
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala:
##########
@@ -539,16 +539,10 @@ case class BinaryPredicate(override val prettyName:
String, left: Expression, ri
Examples:
> SELECT _FUNC_('Spark SQL', 'Spark');
true
- > SELECT _FUNC_(encode('Spark SQL', 'utf-8'), encode('Spark', 'utf-8'));
- true
> SELECT _FUNC_('Spark SQL', 'SPARK');
false
- > SELECT _FUNC_(encode('Spark SQL', 'utf-8'), encode('SPARK', 'utf-8'));
- false
> SELECT _FUNC_('Spark SQL', null);
NULL
- > SELECT _FUNC_(encode('Spark SQL', 'utf-8'), null);
- NULL
> SELECT _FUNC_(x'537061726b2053514c', x'537061726b');
Review Comment:
There is example for binary type already @beliefer
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala:
##########
@@ -580,16 +574,10 @@ case class Contains(left: Expression, right: Expression)
extends StringPredicate
Examples:
> SELECT _FUNC_('Spark SQL', 'Spark');
true
- > SELECT _FUNC_(encode('Spark SQL', 'utf-8'), encode('Spark', 'utf-8'));
- true
> SELECT _FUNC_('Spark SQL', 'SQL');
false
- > SELECT _FUNC_(encode('Spark SQL', 'utf-8'), encode('SQL', 'utf-8'));
- false
> SELECT _FUNC_('Spark SQL', null);
NULL
- > SELECT _FUNC_(encode('Spark SQL', 'utf-8'), null);
- NULL
> SELECT _FUNC_(x'537061726b2053514c', x'537061726b');
Review Comment:
There is example for binary type already @beliefer
--
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]