[ 
https://issues.apache.org/jira/browse/SPARK-32624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17187974#comment-17187974
 ] 

Apache Spark commented on SPARK-32624:
--------------------------------------

User 'rednaxelafx' has created a pull request for this issue:
https://github.com/apache/spark/pull/29602

> Replace getClass.getName with getClass.getCanonicalName in 
> CodegenContext.addReferenceObj
> -----------------------------------------------------------------------------------------
>
>                 Key: SPARK-32624
>                 URL: https://issues.apache.org/jira/browse/SPARK-32624
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Yuming Wang
>            Assignee: Yuming Wang
>            Priority: Major
>             Fix For: 3.0.1, 3.1.0
>
>
> {code:java}
> scala> Array[Byte](1, 2).getClass.getName
> res13: String = [B
> scala> Array[Byte](1, 2).getClass.getCanonicalName
> res14: String = byte[]
> {code}
> {{[B}} is not a correct java type. We should use {{byte[]}}. Otherwise will 
> hit compile issue:
> {noformat}
> 20:49:54.885 ERROR 
> org.apache.spark.sql.catalyst.expressions.codegen.CodeGenerator: 
> ...
> /* 029 */     if (!isNull_2) {
> /* 030 */       value_1 = 
> org.apache.spark.sql.catalyst.util.TypeUtils.compareBinary(value_2, (([B) 
> references[0] /* min */)) >= 0 && 
> org.apache.spark.sql.catalyst.util.TypeUtils.compareBinary(value_2, (([B) 
> references[1] /* max */)) <= 0 ).mightContainBinary(value_2);
> ...
> 20:49:54.886 WARN org.apache.spark.sql.catalyst.expressions.Predicate: Expr 
> codegen error and falling back to interpreter mode
> java.util.concurrent.ExecutionException: 
> org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 
> 30, Column 81: failed to compile: 
> org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 
> 30, Column 81: Unexpected token "[" in primary
>       at 
> com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:306)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to