Skip to content

Commit

Permalink
[SPARK-28844][SQL] Fix typo in SQLConf FILE_COMRESSION_FACTOR
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?
Fix minor typo in SQLConf.
`FILE_COMRESSION_FACTOR` -> `FILE_COMPRESSION_FACTOR`

### Why are the changes needed?
Make conf more understandable.

### Does this PR introduce any user-facing change?
No. (`spark.sql.sources.fileCompressionFactor` is unchanged.)

### How was this patch tested?
Pass the Jenkins with the existing tests.

Closes #25538 from triplesheep/TYPO-FIX.

Authored-by: triplesheep <triplesheep0419@gmail.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
  • Loading branch information
triplesheep authored and dongjoon-hyun committed Aug 22, 2019
1 parent 9ea37b0 commit 48578a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ object SQLConf {
.booleanConf
.createWithDefault(false)

val FILE_COMRESSION_FACTOR = buildConf("spark.sql.sources.fileCompressionFactor")
val FILE_COMPRESSION_FACTOR = buildConf("spark.sql.sources.fileCompressionFactor")
.internal()
.doc("When estimating the output data size of a table scan, multiply the file size with this " +
"factor as the estimated data size, in case the data is compressed in the file and lead to" +
Expand Down Expand Up @@ -2102,7 +2102,7 @@ class SQLConf extends Serializable with Logging {

def escapedStringLiterals: Boolean = getConf(ESCAPED_STRING_LITERALS)

def fileCompressionFactor: Double = getConf(FILE_COMRESSION_FACTOR)
def fileCompressionFactor: Double = getConf(FILE_COMPRESSION_FACTOR)

def stringRedactionPattern: Option[Regex] = getConf(SQL_STRING_REDACTION_PATTERN)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ class FileBasedDataSourceSuite extends QueryTest with SharedSparkSession {

test("SPARK-22790,SPARK-27668: spark.sql.sources.compressionFactor takes effect") {
Seq(1.0, 0.5).foreach { compressionFactor =>
withSQLConf(SQLConf.FILE_COMRESSION_FACTOR.key -> compressionFactor.toString,
withSQLConf(SQLConf.FILE_COMPRESSION_FACTOR.key -> compressionFactor.toString,
SQLConf.AUTO_BROADCASTJOIN_THRESHOLD.key -> "250") {
withTempPath { workDir =>
// the file size is 486 bytes
Expand Down

0 comments on commit 48578a4

Please sign in to comment.