Github user kiszk commented on the issue: https://github.com/apache/spark/pull/21520 Thank you for a lot of works to update many places. It is very hard to split it into several pieces. Now, we are seeing several typical patterns in the all of changes, in paticular by wrapping the original code. Would it be possible to make changes simpler by introducing several APIs? 1) We are seeing many `inline` prefix with a few typical patterns. ``` inline"${classOf[...].getName}" inline"${CodeGenerator.javaType(...)}" inline"${CodeGenerator.boxedType(...)}" ``` Can we introduce new APIs to avoid repetations of adding `inline`, for example `JavaCode.className(Class[_]): JavaCode` for the first call. 2) We are seeing many `JavaCode.global()` or `JavaCode.variable()` when we create a new variable. Would it be possible to make them simpler? For example, we may introduce these APIs. ``` ctx.addMutableState(..., Class[_]) ctx.freshName(..., DataType) ctx.freshNameIsNull(...) ``` The first one calls `JavaCode.global()` in the method. The second one calls `JavaCode.variable()`. WDYT?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org