Skip to content

Commit 4e60e36

Browse files
CopilotpxLi
andcommitted
Fix line length issue in GpuSlice comment and condition
Co-authored-by: pxLi <8086184+pxLi@users.noreply.github.com>
1 parent 97e5b48 commit 4e60e36

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

sql-plugin/src/main/scala/org/apache/spark/sql/rapids/collectionOperations.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,11 @@ case class GpuSlice(x: Expression, start: Expression, length: Expression)
174174

175175
override def doColumnar(listCol: GpuColumnVector, startS: GpuScalar,
176176
lengthS: GpuScalar): ColumnVector = {
177-
// When input column is all nulls or either start or length is null, return all nulls like the CPU does.
178-
// This matches CPU behavior for slice function with null inputs.
179-
if (listCol.getRowCount == listCol.getBase.getNullCount || !startS.isValid || !lengthS.isValid) {
177+
// When input column is all nulls or either start or length is null,
178+
// return all nulls like the CPU does. This matches CPU behavior for
179+
// slice function with null inputs.
180+
if (listCol.getRowCount == listCol.getBase.getNullCount ||
181+
!startS.isValid || !lengthS.isValid) {
180182
GpuColumnVector.columnVectorFromNull(listCol.getRowCount.toInt, dataType)
181183
} else {
182184
val list = listCol.getBase

0 commit comments

Comments
 (0)