关注 spark技术分享,
撸spark源码 玩spark最佳实践

CodeGenerator

CodeGenerator

CodeGenerator is a base class for generators of JVM bytecode for expression evaluation.

Table 1. CodeGenerator’s Internal Properties
Name Description

cache

Guava’s LoadingCache with at most 100 pairs of CodeAndComment and GeneratedClass.

genericMutableRowType

Tip

Enable INFO or DEBUG logging level for org.apache.spark.sql.catalyst.expressions.codegen.CodeGenerator logger to see what happens inside.

Add the following line to conf/log4j.properties:

Refer to Logging.

CodeGenerator Contract

Table 2. CodeGenerator Contract
Method Description

generate

Generates an evaluator for expression(s) that may (optionally) have expression(s) bound to a schema (i.e. a collection of Attribute).

Used in:

Compiling Java Source Code using Janino — doCompile Internal Method

Caution
FIXME

Finding or Compiling Java Source Code — compile Method

Caution
FIXME

create Method

Caution
FIXME
Note

create is used when:

Creating CodegenContext — newCodeGenContext Method

newCodeGenContext simply creates a new CodegenContext.

Note

newCodeGenContext is used when:

赞(0) 打赏
未经允许不得转载:spark技术分享 » CodeGenerator
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏