Skip to content

Commit

Permalink
disable the rule that checks the maxPartitions for dsv2
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaohehuhu committed Apr 7, 2024
1 parent acc3587 commit fb113d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,7 @@ case class MaxScanStrategy(session: SparkSession)
_,
relation @ DataSourceV2ScanRelation(_, _, _, _, _)) =>
val table = relation.relation.table
if (table.partitioning().nonEmpty &&
relation.scan.isInstanceOf[SupportsReportPartitioning]) {
if (table.partitioning().nonEmpty) {
val partitionColumnNames = table.partitioning().map(_.describe())
val stats = relation.computeStats()
lazy val scanFileSize = stats.sizeInBytes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ trait WatchDogSuiteBase extends KyuubiSparkSQLExtensionTest {
assert(e.getMessage == "Script transformation is not allowed")
}
}

test("watchdog with scan maxFileSize -- data source v2") {
val df = spark.read.format(classOf[ReportStatisticsAndPartitionAwareDataSource].getName).load()
df.createOrReplaceTempView("test")
Expand Down

0 comments on commit fb113d6

Please sign in to comment.