Skip to content

Commit

Permalink
revert code
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaohehuhu committed Dec 21, 2023
1 parent d5a1db3 commit 9e82fe2
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,10 @@ case class MaxScanStrategy(session: SparkSession)
} else {
lazy val scanFileSize = relation.tableMeta.stats.map(_.sizeInBytes).sum
if (maxFileSizeOpt.exists(_ < scanFileSize)) {
throw new MaxFileSizeExceedException(
s"""
|Your SQL job scan a whole huge table without any partition filter,
|You should optimize your SQL logical according partition structure
|or shorten query scope such as p_date, detail as below:
|Table: ${relation.tableMeta.qualifiedName}
|Owner: ${relation.tableMeta.owner}
|Partition Structure: ${relation.partitionCols.map(_.name).mkString(", ")}
|""".stripMargin)
throw nonPartTableMaxFileExceedError(
scanFileSize,
maxFileSizeOpt.get,
Some(relation.tableMeta))
}
}
case ScanOperation(
Expand Down

0 comments on commit 9e82fe2

Please sign in to comment.