Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
address comments
  • Loading branch information
gengliangwang committed Jul 21, 2018
commit e5c170281429e0a3b2981eef9c08a2a757c89d0d
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ case class CatalystDataToAvro(child: Expression) extends UnaryExpression {
override protected def doGenCode(ctx: CodegenContext, ev: ExprCode): ExprCode = {
val expr = ctx.addReferenceObj("this", this)
defineCodeGen(ctx, ev, input =>
s"(${CodeGenerator.boxedType(dataType)})$expr.nullSafeEval($input)")
s"(byte[]) $expr.nullSafeEval($input)")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class AvroFunctionsSuite extends QueryTest with SharedSQLContext {
val avroTypeLong = new Schema.Parser().parse(
s"""
|{
| "type": "long",
| "type": "int",
| "name": "id"
|}
""".stripMargin)
Expand Down