Skip to content

Commit

Permalink
Add comment for Uint64
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhushukla committed Dec 21, 2021
1 parent 0e3ad04 commit 85e4ae1
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,10 @@ trait ParquetPartitionReaderBase extends Logging with Arm with ScanWithMetrics
}

def needDecimalCast(cv: ColumnView, dt: DataType): Boolean = {
// UINT64 is casted to Decimal(20,0) by Spark to accommodate
// the largest possible values this type can take. Other Unsigned data types are converted to
// basic types like LongType, this is analogous to that except we spill over to large
// decimal/ints.
cv.getType.isDecimalType && !GpuColumnVector.getNonNestedRapidsType(dt).equals(cv.getType()) ||
cv.getType.equals(DType.UINT64)
}
Expand Down

0 comments on commit 85e4ae1

Please sign in to comment.