409fea30cc
### What changes were proposed in this pull request? ```scala scala> Array[Byte](1, 2).getClass.getName res13: String = [B scala> Array[Byte](1, 2).getClass.getCanonicalName res14: String = byte[] ``` This pr replace `getClass.getName` with `getClass.getCanonicalName` in `CodegenContext.addReferenceObj` to fix `byte[]` compile issue: ``` ... /* 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; /* 031 */ } /* 032 */ return !isNull_1 && value_1; /* 033 */ } /* 034 */ /* 035 */ /* 036 */ } 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 ... ``` ### Why are the changes needed? Fix compile issue when compiling generated code. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Unit test. Closes #29439 from wangyum/SPARK-32624. Authored-by: Yuming Wang <yumwang@ebay.com> Signed-off-by: Yuming Wang <wgyumg@gmail.com> |
||
---|---|---|
.. | ||
benchmarks | ||
src | ||
pom.xml |