From 07c5d490a6d37094989a4f4b63f6c4847ee2ad6c Mon Sep 17 00:00:00 2001 From: Dhruv Arya Date: Thu, 12 Dec 2024 09:50:36 +0530 Subject: [PATCH] rename function --- .../main/scala/org/apache/spark/sql/delta/Snapshot.scala | 6 +++--- .../scala/org/apache/spark/sql/delta/SnapshotState.scala | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spark/src/main/scala/org/apache/spark/sql/delta/Snapshot.scala b/spark/src/main/scala/org/apache/spark/sql/delta/Snapshot.scala index e04b6f3cf2..930e1eed49 100644 --- a/spark/src/main/scala/org/apache/spark/sql/delta/Snapshot.scala +++ b/spark/src/main/scala/org/apache/spark/sql/delta/Snapshot.scala @@ -579,13 +579,13 @@ class Snapshot( .orElse(Option.when(_computedStateTriggered)(domainMetadata)), numDeletedRecordsOpt = checksumOpt.flatMap(_.numDeletedRecordsOpt) .orElse(Option.when(_computedStateTriggered)(numDeletedRecordsOpt).flatten) - .filter(_ => deletionVectorMetricsEnabled), + .filter(_ => deletionVectorsReadableAndMetricsEnabled), numDeletionVectorsOpt = checksumOpt.flatMap(_.numDeletionVectorsOpt) .orElse(Option.when(_computedStateTriggered)(numDeletionVectorsOpt).flatten) - .filter(_ => deletionVectorMetricsEnabled), + .filter(_ => deletionVectorsReadableAndMetricsEnabled), deletedRecordCountsHistogramOpt = checksumOpt.flatMap(_.deletedRecordCountsHistogramOpt) .orElse(Option.when(_computedStateTriggered)(deletedRecordCountsHistogramOpt).flatten) - .filter(_ => deletionVectorMetricsEnabled && deletionVectorHistogramEnabled), + .filter(_ => deletionVectorsReadableAndHistogramEnabled), histogramOpt = checksumOpt.flatMap(_.histogramOpt) ) diff --git a/spark/src/main/scala/org/apache/spark/sql/delta/SnapshotState.scala b/spark/src/main/scala/org/apache/spark/sql/delta/SnapshotState.scala index edf309fada..0a7e8f3e10 100644 --- a/spark/src/main/scala/org/apache/spark/sql/delta/SnapshotState.scala +++ b/spark/src/main/scala/org/apache/spark/sql/delta/SnapshotState.scala @@ -213,17 +213,17 @@ trait SnapshotStateManager extends DeltaLogging { self: Snapshot => def deletedRecordCountsHistogramOpt: Option[DeletedRecordCountsHistogram] = computedState.deletedRecordCountsHistogramOpt - protected def deletionVectorMetricsEnabled: Boolean = { + protected def deletionVectorsReadableAndMetricsEnabled: Boolean = { val checksumDVMetricsEnabled = spark.sessionState.conf.getConf(DeltaSQLConf.DELTA_CHECKSUM_DV_METRICS_ENABLED) val dvsReadable = DeletionVectorUtils.deletionVectorsReadable(snapshotToScan) checksumDVMetricsEnabled && dvsReadable } - protected def deletionVectorHistogramEnabled: Boolean = { + protected def deletionVectorsReadableAndHistogramEnabled: Boolean = { val deletedRecordCountsHistogramEnabled = spark.sessionState.conf.getConf(DeltaSQLConf.DELTA_DELETED_RECORD_COUNTS_HISTOGRAM_ENABLED) - deletionVectorMetricsEnabled && deletedRecordCountsHistogramEnabled + deletionVectorsReadableAndMetricsEnabled && deletedRecordCountsHistogramEnabled } /** Generate a default SnapshotState of a new table given the table metadata and the protocol. */