-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-34696][SQL][TESTS] Fix CodegenInterpretedPlanTest to generate correct test cases #31766
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 all 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 |
|---|---|---|
|
|
@@ -44,12 +44,18 @@ trait CodegenInterpretedPlanTest extends PlanTest { | |
| val codegenMode = CodegenObjectFactoryMode.CODEGEN_ONLY.toString | ||
| val interpretedMode = CodegenObjectFactoryMode.NO_CODEGEN.toString | ||
|
|
||
| withSQLConf(SQLConf.CODEGEN_FACTORY_MODE.key -> codegenMode) { | ||
| super.test(testName + " (codegen path)", testTags: _*)(testFun)(pos) | ||
|
Contributor
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.
Member
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.
Contributor
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.
Member
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. Here, we define these tests by using
Member
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. When the derived classes define test cases with this
Contributor
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. ah, now I got it! What a hidden bug 😂 |
||
| } | ||
| withSQLConf(SQLConf.CODEGEN_FACTORY_MODE.key -> interpretedMode) { | ||
| super.test(testName + " (interpreted path)", testTags: _*)(testFun)(pos) | ||
| } | ||
| super.test(testName + " (codegen path)", testTags: _*)( | ||
| withSQLConf(SQLConf.CODEGEN_FACTORY_MODE.key -> codegenMode) { testFun })(pos) | ||
| super.test(testName + " (interpreted path)", testTags: _*)( | ||
| withSQLConf(SQLConf.CODEGEN_FACTORY_MODE.key -> interpretedMode) { testFun })(pos) | ||
dongjoon-hyun marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| protected def testFallback( | ||
| testName: String, | ||
| testTags: Tag*)(testFun: => Any)(implicit pos: source.Position): Unit = { | ||
| val codegenMode = CodegenObjectFactoryMode.FALLBACK.toString | ||
| super.test(testName + " (codegen fallback mode)", testTags: _*)( | ||
| withSQLConf(SQLConf.CODEGEN_FACTORY_MODE.key -> codegenMode) { testFun })(pos) | ||
| } | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we know why this simply test has to use fallback test?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also was surprised that we have several cases instead of the new two tests.
It seems to be broken at some commits during the time because we didn't notice it due to this
CodegenInterpretedPlanTesttest framework bug.Actually, I decided to focus on the test suite first and makes the recovery the beyond of the scope of this PR.
We may had better file a new JIRA aiming the recovery of those test cases one by one if possible.
BTW, for this specific instance, the following was the error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test suite fix aims to land to
master/3.1/3.0/2.4.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good, let's fix these bugs one by one later.