AvroDataToCatalyst Unary Expression
AvroDataToCatalyst is a unary expression that represents from_avro function in a structured query.
AvroDataToCatalyst takes the following when created:
AvroDataToCatalyst generates Java source code (as ExprCode) for code-generated expression evaluation.
Generating Java Source Code (ExprCode) For Code-Generated Expression Evaluation — doGenCode Method
|
1 2 3 4 5 |
doGenCode(ctx: CodegenContext, ev: ExprCode): ExprCode |
|
Note
|
doGenCode is part of Expression Contract to generate a Java source code (ExprCode) for code-generated expression evaluation.
|
doGenCode requests the CodegenContext to generate code to reference this AvroDataToCatalyst instance.
In the end, doGenCode defineCodeGen with the function f that uses nullSafeEval.
nullSafeEval Method
|
1 2 3 4 5 |
nullSafeEval(input: Any): Any |
|
Note
|
nullSafeEval is part of the UnaryExpression Contract to…FIXME.
|
nullSafeEval…FIXME
spark技术分享