Skip to content

Commit

Permalink
address the comments
Browse files Browse the repository at this point in the history
Signed-off-by: Firestarman <firestarmanllc@gmail.com>
  • Loading branch information
firestarman committed Mar 1, 2022
1 parent e0d7676 commit 51f6c43
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@

package org.apache.spark.sql.rapids

import java.util.Optional

import ai.rapids.cudf.{ColumnVector, ColumnView, DType}
import com.nvidia.spark.rapids.{BinaryExprMeta, DataFromReplacementRule, DataTypeUtils, GpuBinaryExpression, GpuColumnVector, GpuExpression, GpuOverrides, GpuScalar, GpuUnaryExpression, RapidsConf, RapidsMeta, UnaryExprMeta}
import ai.rapids.cudf.ColumnVector
import com.nvidia.spark.rapids.{BinaryExprMeta, DataFromReplacementRule, DataTypeUtils, GpuBinaryExpression, GpuColumnVector, GpuExpression, GpuListUtils, GpuOverrides, GpuScalar, GpuUnaryExpression, RapidsConf, RapidsMeta, UnaryExprMeta}
import com.nvidia.spark.rapids.RapidsPluginImplicits._
import com.nvidia.spark.rapids.shims.v2.{RapidsErrorUtils, ShimUnaryExpression}

Expand Down Expand Up @@ -304,8 +302,7 @@ case class GpuGetArrayStructFields(
structView.getChildColumnView(ordinal)
}
val listView = withResource(fieldView) { _ =>
new ColumnView(DType.LIST, base.getRowCount, Optional.of[java.lang.Long](base.getNullCount),
base.getValid, base.getOffsets, Array(fieldView))
GpuListUtils.replaceListDataColumnAsView(base, fieldView)
}
withResource(listView) { _ =>
listView.copyToColumnVector()
Expand Down

0 comments on commit 51f6c43

Please sign in to comment.