-
Notifications
You must be signed in to change notification settings - Fork 29.3k
[SPARK-25406][SQL] For ParquetSchemaPruningSuite.scala, move calls to withSQLConf inside calls to test
#22394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -156,20 +156,24 @@ class ParquetSchemaPruningSuite | |
| } | ||
|
|
||
| private def testSchemaPruning(testName: String)(testThunk: => Unit) { | ||
| withSQLConf(SQLConf.PARQUET_VECTORIZED_READER_ENABLED.key -> "true") { | ||
| test(s"Spark vectorized reader - without partition data column - $testName") { | ||
| test(s"Spark vectorized reader - without partition data column - $testName") { | ||
| withSQLConf(SQLConf.PARQUET_VECTORIZED_READER_ENABLED.key -> "true") { | ||
| withContacts(testThunk) | ||
| } | ||
| test(s"Spark vectorized reader - with partition data column - $testName") { | ||
| } | ||
| test(s"Spark vectorized reader - with partition data column - $testName") { | ||
| withSQLConf(SQLConf.PARQUET_VECTORIZED_READER_ENABLED.key -> "true") { | ||
| withContactsWithDataPartitionColumn(testThunk) | ||
| } | ||
| } | ||
|
|
||
| withSQLConf(SQLConf.PARQUET_VECTORIZED_READER_ENABLED.key -> "false") { | ||
| test(s"Parquet-mr reader - without partition data column - $testName") { | ||
| test(s"Parquet-mr reader - without partition data column - $testName") { | ||
| withSQLConf(SQLConf.PARQUET_VECTORIZED_READER_ENABLED.key -> "false") { | ||
| withContacts(testThunk) | ||
| } | ||
| test(s"Parquet-mr reader - with partition data column - $testName") { | ||
| } | ||
| test(s"Parquet-mr reader - with partition data column - $testName") { | ||
| withSQLConf(SQLConf.PARQUET_VECTORIZED_READER_ENABLED.key -> "false") { | ||
| withContactsWithDataPartitionColumn(testThunk) | ||
| } | ||
| } | ||
|
|
@@ -209,7 +213,7 @@ class ParquetSchemaPruningSuite | |
| MixedCase(1, "r1c1", MixedCaseColumn("123", 2)) :: | ||
| Nil | ||
|
|
||
| testMixedCasePruning("select with exact column names") { | ||
| testExactCasePruning("select with exact column names") { | ||
| val query = sql("select CoL1, coL2.B from mixedcase") | ||
| checkScan(query, "struct<CoL1:string,coL2:struct<B:int>>") | ||
| checkAnswer(query.orderBy("id"), | ||
|
|
@@ -245,28 +249,32 @@ class ParquetSchemaPruningSuite | |
| checkAnswer(query.orderBy("id"), Row(1) :: Nil) | ||
| } | ||
|
|
||
| private def testMixedCasePruning(testName: String)(testThunk: => Unit) { | ||
| withSQLConf(SQLConf.PARQUET_VECTORIZED_READER_ENABLED.key -> "true", | ||
| SQLConf.CASE_SENSITIVE.key -> "true") { | ||
| test(s"Spark vectorized reader - case-sensitive parser - mixed-case schema - $testName") { | ||
| withMixedCaseData(testThunk) | ||
| private def testExactCasePruning(testName: String)(testThunk: => Unit) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. testCaseSensitivePruning?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks testing case insensitivity too?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The method names are meant to clarify the kind of queries being tested, not the setting of It's not a very good name in that sense. I'll try to make it clearer and add a code comment to clarify. |
||
| test(s"Spark vectorized reader - case-sensitive parser - mixed-case schema - $testName") { | ||
| withSQLConf(SQLConf.PARQUET_VECTORIZED_READER_ENABLED.key -> "true", | ||
| SQLConf.CASE_SENSITIVE.key -> "true") { | ||
| withMixedCaseData(testThunk) | ||
| } | ||
| } | ||
| withSQLConf(SQLConf.PARQUET_VECTORIZED_READER_ENABLED.key -> "false", | ||
| SQLConf.CASE_SENSITIVE.key -> "false") { | ||
| test(s"Parquet-mr reader - case-insensitive parser - mixed-case schema - $testName") { | ||
| test(s"Parquet-mr reader - case-sensitive parser - mixed-case schema - $testName") { | ||
| withSQLConf(SQLConf.PARQUET_VECTORIZED_READER_ENABLED.key -> "false", | ||
| SQLConf.CASE_SENSITIVE.key -> "true") { | ||
| withMixedCaseData(testThunk) | ||
| } | ||
| } | ||
| withSQLConf(SQLConf.PARQUET_VECTORIZED_READER_ENABLED.key -> "true", | ||
| SQLConf.CASE_SENSITIVE.key -> "false") { | ||
| test(s"Spark vectorized reader - case-insensitive parser - mixed-case schema - $testName") { | ||
| withMixedCaseData(testThunk) | ||
| testMixedCasePruning(testName)(testThunk) | ||
| } | ||
|
|
||
| private def testMixedCasePruning(testName: String)(testThunk: => Unit) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. testCaseInSensitivePruning?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Previously, this method ran will fail if I'll push a commit that refactors the method names and add code comments that will make this clearer. |
||
| test(s"Parquet-mr reader - case-insensitive parser - mixed-case schema - $testName") { | ||
| withSQLConf(SQLConf.PARQUET_VECTORIZED_READER_ENABLED.key -> "false", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The vectorized reader cases in both |
||
| SQLConf.CASE_SENSITIVE.key -> "false") { | ||
| withMixedCaseData(testThunk) | ||
| } | ||
| } | ||
| withSQLConf(SQLConf.PARQUET_VECTORIZED_READER_ENABLED.key -> "false", | ||
| SQLConf.CASE_SENSITIVE.key -> "true") { | ||
| test(s"Parquet-mr reader - case-sensitive parser - mixed-case schema - $testName") { | ||
| test(s"Spark vectorized reader - case-insensitive parser - mixed-case schema - $testName") { | ||
| withSQLConf(SQLConf.PARQUET_VECTORIZED_READER_ENABLED.key -> "true", | ||
| SQLConf.CASE_SENSITIVE.key -> "false") { | ||
| withMixedCaseData(testThunk) | ||
| } | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.