File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
main/scala/org/apache/spark/sql/catalyst/expressions
test/scala/org/apache/spark/sql/catalyst/expressions Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -327,7 +327,7 @@ case class Hex(child: Expression)
327327 * Converts every character in s to two hex digits.
328328 */
329329 private def hex (str : UTF8String ): UTF8String = {
330- doHex (str.getBytes, str.length() )
330+ hex (str.getBytes)
331331 }
332332
333333 private def hex (bytes : Array [Byte ]): UTF8String = {
Original file line number Diff line number Diff line change @@ -232,6 +232,7 @@ class MathFunctionsSuite extends SparkFunSuite with ExpressionEvalHelper {
232232 checkEvaluation(Hex (Literal (- 100800200404L )), " FFFFFFE887D7012C" )
233233 checkEvaluation(Hex (Literal (" helloHex" )), " 68656C6C6F486578" )
234234 checkEvaluation(Hex (Literal (" helloHex" .getBytes())), " 68656C6C6F486578" )
235+ checkEvaluation(Hex (Literal (" 三重的" )), " E4B889E9878DE79A84" )
235236 }
236237
237238 test(" hypot" ) {
You can’t perform that action at this time.
0 commit comments