You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (Jira)" <ji...@apache.org> on 2021/09/29 05:23:00 UTC
[jira] [Commented] (SPARK-36888) Sha2 with bit_length 512 not being
tested
[ https://issues.apache.org/jira/browse/SPARK-36888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17421934#comment-17421934 ]
Hyukjin Kwon commented on SPARK-36888:
--------------------------------------
Please go ahead and add a test
> Sha2 with bit_length 512 not being tested
> -----------------------------------------
>
> Key: SPARK-36888
> URL: https://issues.apache.org/jira/browse/SPARK-36888
> Project: Spark
> Issue Type: Task
> Components: SQL
> Affects Versions: 3.2.0
> Reporter: H. Vetinari
> Priority: Major
>
> Looking at [https://github.com/apache/spark/commit/6c6291b3f6ac13b8415b87b2b741a9cd95bc6c3b] for https://issues.apache.org/jira/browse/SPARK-36836, it's clear that 512 bits are supported
> {{bitLength match {}}
> {{[...]}}
> {{ case 512 =>}}
> {{ UTF8String.fromString(DigestUtils.sha512Hex(input))}}
> resp.
> {{nullSafeCodeGen(ctx, ev, (eval1, eval2) => {}}
> {{ [...]}}
> {{ else if ($eval2 == 512) {}}
> {{ ${ev.value} =}}
> {{ UTF8String.fromString($digestUtils.sha512Hex($eval1));}}
> but the test claims it is unsupported:
> {{// unsupported bit length}}
> {{checkEvaluation(Sha2(Literal.create(null, BinaryType), Literal(1024)), null)}}
> {{checkEvaluation(Sha2(Literal.create(null, BinaryType), Literal(512)), null)}}
> To avoid a similar fate as SPARK-36836, tests should be added.
>
> CC [~richardc-db]
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org