You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Yuming Wang (Jira)" <ji...@apache.org> on 2020/08/19 12:22:00 UTC

[jira] [Resolved] (SPARK-32624) Replace getClass.getName with getClass.getCanonicalName in CodegenContext.addReferenceObj

     [ https://issues.apache.org/jira/browse/SPARK-32624?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yuming Wang resolved SPARK-32624.
---------------------------------
    Fix Version/s: 3.1.0
                   3.0.1
       Resolution: Fixed

Issue resolved by pull request 29439
[https://github.com/apache/spark/pull/29439]

> 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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org