Skip to content

Commit

Permalink
Update BaseScriptTransformationExec.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
AngersZhuuuu committed Aug 21, 2020
1 parent 9340034 commit 4173cfb
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -107,7 +107,7 @@ trait BaseScriptTransformationExec extends UnaryExecNode {
val processRowWithoutSerde = if (!ioschema.schemaLess) {
prevLine: String =>
new GenericInternalRow(
prevLine.split(outputRowFormat)
prevLine.split(outputRowFormat).padTo(outputFieldWriters.size, null)
.zip(outputFieldWriters)
.map { case (data, writer) => writer(data) })
} else {
Expand All @@ -119,7 +119,7 @@ trait BaseScriptTransformationExec extends UnaryExecNode {
val kvWriter = CatalystTypeConverters.createToCatalystConverter(StringType)
prevLine: String =>
new GenericInternalRow(
prevLine.split(outputRowFormat).slice(0, 2).padTo(2, null)
prevLine.split(outputRowFormat).slice(0, 2)
.map(kvWriter))
}

Expand Down

0 comments on commit 4173cfb

Please sign in to comment.