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

CallMethodViaReflection

CallMethodViaReflection Expression

CallMethodViaReflection is an expression that represents a static method call in Scala or Java using reflect and java_method functions.

Note
reflect and java_method functions are only supported in SQL and expression modes.
Table 1. CallMethodViaReflection’s DataType to JVM Types Mapping
DataType JVM Type

BooleanType

java.lang.Boolean / scala.Boolean

ByteType

java.lang.Byte / Byte

ShortType

java.lang.Short / Short

IntegerType

java.lang.Integer / Int

LongType

java.lang.Long / Long

FloatType

java.lang.Float / Float

DoubleType

java.lang.Double / Double

StringType

String

CallMethodViaReflection supports a fallback mode for expression code generation.

Table 2. CallMethodViaReflection’s Properties
Property Description

dataType

StringType

deterministic

Disabled (i.e. false)

nullable

Enabled (i.e. true)

prettyName

reflect

Note
CallMethodViaReflection is very similar to StaticInvoke expression.
赞(0) 打赏
未经允许不得转载:spark技术分享 » CallMethodViaReflection
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

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

支付宝扫一扫打赏

微信扫一扫打赏