viirya commented on a change in pull request #31814:
URL: https://github.com/apache/spark/pull/31814#discussion_r593333950
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
##########
@@ -1089,7 +1089,8 @@ class CodegenContext extends Logging {
// Generate the code for this expression tree and wrap it in a function.
val fnName = freshName("subExpr")
val inputVars = inputVarsForAllFuncs(i)
- val argList = inputVars.map(v => s"${v.javaType.getName} ${v.variableName}")
Review comment:
For example, for the unit test, it is:
```java
/* 001 */ public java.lang.Object generate(Object[] references) {
/* 002 */ return new TestCode(references);
/* 003 */ }
/* 004 */
/* 005 */ class TestCode {
/* 006 */ private byte[] str_0;
/* 007 */ private int pos_0;
/* 008 */
/* 009 */ public TestCode(Object[] references) {
/* 010 */ }
/* 011 */
/* 012 */ public void initialize(int partitionIndex) {
/* 013 */ int subExprValue_0 = subExpr_0(pos_0, str_0);
/* 014 */ }
/* 015 */
/* 016 */
/* 017 */ private int subExpr_0(int pos_0, [B str_0) {
/* 018 */ byte[] value_1 = null;
/* 019 */ value_1 = org.apache.spark.unsafe.types.ByteArray.subStringSQL(str_0, pos_0, 2147483647);
/* 020 */ int value_0 = -1;
/* 021 */ value_0 = (value_1).length;
/* 022 */
/* 023 */ return value_0;
/* 024 */ }
/* 025 */
/* 026 */ }
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org