GitHub user viirya opened a pull request:
https://github.com/apache/spark/pull/21537
[SPARK-24505][SQL] Convert strings in codegen to blocks: Cast and
BoundAttribute
## What changes were proposed in this pull request?
This is split from #21520. This includes changes of `BoundAttribute` and
`Cast`.
This patch also adds few convenient APIs:
```scala
CodeGenerator.freshName(name: String, dt: DataType): VariableValue
CodeGenerator.freshName(name: String, javaClass: Class[_]): VariableValue
CodeGenerator.isNullFreshName(name: String): VariableValue
JavaCode.className(javaClass: Class[_]): InlineBlock
JavaCode.javaType(dataType: DataType): InlineBlock
JavaCode.boxedType(dataType: DataType): InlineBlock
```
## How was this patch tested?
Existing tests.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/viirya/spark-1 SPARK-24505-1
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/21537.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #21537
----
commit 89d025225b557689389d16c207be8a25f5e82fa5
Author: Liang-Chi Hsieh <viirya@...>
Date: 2018-06-12T08:40:20Z
Convert strings in codegen to blocks.
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]