Skip to content

Commit

Permalink
fix bigint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sunchao committed Nov 9, 2023
1 parent 9e2d874 commit c31f21d
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,10 @@ object CommandUtils extends Logging {
(BigInt, Seq[CatalogTablePartition]) = {
val sessionState = spark.sessionState
val startTime = System.nanoTime()
val (totalSize: BigInt, newPartitions) = if (catalogTable.partitionColumnNames.isEmpty) {
(calculateSingleLocationSize(sessionState, catalogTable.identifier,
catalogTable.storage.locationUri), Seq())
val (totalSize, newPartitions) = if (catalogTable.partitionColumnNames.isEmpty) {
val size = calculateSingleLocationSize(sessionState, catalogTable.identifier,
catalogTable.storage.locationUri)
(BigInt(size), Seq())
} else {
// Calculate table size as a sum of the visible partitions. See SPARK-21079
val partitions = sessionState.catalog.listPartitions(catalogTable.identifier)
Expand Down

0 comments on commit c31f21d

Please sign in to comment.