You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by GitBox <gi...@apache.org> on 2021/10/19 16:10:25 UTC

[GitHub] [incubator-kyuubi] cfmcgrady commented on a change in pull request #1260: Avoid calling javax.xml API for better JDK compatible

cfmcgrady commented on a change in pull request #1260:
URL: https://github.com/apache/incubator-kyuubi/pull/1260#discussion_r732030494



##########
File path: dev/kyuubi-extension-spark-common/src/main/scala/org/apache/kyuubi/sql/zorder/ZorderSqlAstBuilderBase.scala
##########
@@ -229,7 +229,7 @@ abstract class ZorderSqlAstBuilderBase extends ZorderSqlExtensionsBaseVisitor[An
         case "X" =>
           val padding = if (value.length % 2 != 0) "0" else ""
 
-          Literal(DatatypeConverter.parseHexBinary(padding + value))
+          Literal(Hex.decodeHex(padding + value))

Review comment:
       looks fine as spark also decode through `org.apache.commons.codec.binary.Hex.decodeHex()`.  https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala#L2201




-- 
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: commits-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org