Skip to content

Commit 4b0a85b

Browse files
author
Nan Zhu
committed
address more comments
1 parent 36e8ac4 commit 4b0a85b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,14 +264,14 @@ object SQLConf {
264264
.createWithDefault(false)
265265

266266
val DISK_TO_MEMORY_SIZE_FACTOR = buildConf(
267-
"org.apache.spark.sql.execution.datasources.sizeFactor")
267+
"org.apache.spark.sql.execution.datasources.fileDataSizeFactor")
268268
.internal()
269269
.doc("The result of multiplying this factor with the size of data source files is propagated " +
270270
"to serve as the stats to choose the best execution plan. In the case where the " +
271271
"in-disk and in-memory size of data is significantly different, users can adjust this " +
272272
"factor for a better choice of the execution plan. The default value is 1.0.")
273273
.doubleConf
274-
.checkValue(_ > 0, "the value of sizeFactor must be larger than 0")
274+
.checkValue(_ > 0, "the value of fileDataSizeFactor must be larger than 0")
275275
.createWithDefault(1.0)
276276

277277
val PARQUET_SCHEMA_MERGING_ENABLED = buildConf("spark.sql.parquet.mergeSchema")
@@ -1252,7 +1252,7 @@ class SQLConf extends Serializable with Logging {
12521252

12531253
def escapedStringLiterals: Boolean = getConf(ESCAPED_STRING_LITERALS)
12541254

1255-
def sizeToMemorySizeFactor: Double = getConf(DISK_TO_MEMORY_SIZE_FACTOR)
1255+
def diskToMemorySizeFactor: Double = getConf(DISK_TO_MEMORY_SIZE_FACTOR)
12561256

12571257
def stringRedationPattern: Option[Regex] = SQL_STRING_REDACTION_PATTERN.readFrom(reader)
12581258

sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/HadoopFsRelation.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ case class HadoopFsRelation(
8383
}
8484

8585
override def sizeInBytes: Long = {
86-
val sizeFactor = sqlContext.conf.sizeToMemorySizeFactor
86+
val sizeFactor = sqlContext.conf.diskToMemorySizeFactor
8787
(location.sizeInBytes * sizeFactor).toLong
8888
}
8989

0 commit comments

Comments
 (0)