-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-6617][table] Improve JAVA and SCALA logical plans consistent test #3943
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
Conversation
twalthr
left a comment
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.
Thanks for the PR @sunjincheng121. The changes look very good, I had only minor comments. The validation packages should only contain validation tests and not the regular tests. Would be great if you could split the tests.
stringexprfor Java == Scalavalidationfor testing wrong table programsruntimefor ITCases- remaining packages for unit tests
As a summary, right?
| */ | ||
|
|
||
| package org.apache.flink.table.api.scala.stream.table | ||
| package org.apache.flink.table.api.scala.stream.table.validation |
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 think tests in validation packages should all test for a ValidationException. Can you split this class?
| case class BatchTableTestUtil() extends TableTestUtil { | ||
|
|
||
| val javaEnv = mock(classOf[JExecutionEnvironment]) | ||
| val javaTableEnv = TableEnvironment.getTableEnvironment(javaEnv) |
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.
Maybe we can rename the Scala environment to tableEnv to be consistent.
| import org.junit.Test | ||
|
|
||
| class UnionStringExpressionTest extends TableTestBase { | ||
| @Test |
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.
Add an empty line here.
fb56921 to
79aa4b2
Compare
|
Hi @twalthr Thanks a lot for your reviewing. I completely agree with your suggestions. I petty want refactoring the test structure. I have updated the PR. according your comments. Thanks, |
2028b87 to
93d9e6d
Compare
a69c0b2 to
897034c
Compare
|
I once again seriously consider the Refactoring work, according to the following principles updated the PR. First, the test type and purpose(4 types):
Second, the directory structure(folders) and purpose: Third, the file name naming convention:
After the change of the directory structure, as shown below: @twalthr @fhueske @wuchong The change is big, so I need your help to ensure that the direction of change is correct. Best, |
897034c to
f326b3d
Compare
|
Hi @sunjincheng121 , thanks for your great work. I like your proposal. The test structure refactoring looks good to me. I think it's good to put all the IT cases in one place. |
f4ea048 to
30093e3
Compare
fc4ba3b to
c09594a
Compare
c09594a to
0947427
Compare
|
Rebase code... |
|
I think that is a very good idea. A review of a +6k -4k LOC PR takes a lot of time and has a good chance to be interrupted by other issues. Several smaller PRs would be much easier to review and merge. Thank you very much! |
|
@sunjincheng121 the structure looks very good. I would volunteer to go over the changes as a whole and merge this. If @fhueske @wuchong are fine with this? Can you rebase the PR a last time? |
|
Thanks @twalthr , I'm fine with this ,a great +1! |
|
@twalthr, sure! Thanks for taking care of this PR. |
|
@twalthr Extremely grateful If you can review and merge this PR after I rebase the PR. |
0947427 to
b1b70bf
Compare
|
@twalthr I have rebase the PR. I appreciated if you can review it. And i'll quick updated it when you left comments. Thanks, |
b1b70bf to
8ee49df
Compare
|
Update again. Because the new merged code. |
|
Thanks for the update @sunjincheng121. I will go over all changes and try to merge this. |
8ee49df to
c698f3b
Compare
|
Thanks @twalthr ! I have rebased the code and updated the PR. Thanks, |
c698f3b to
de0f189
Compare
|
Rebase code according master. |
|
@wuchong @sunjincheng121 @fhueske I tried to simplify the package structure a little bit. I based my changes on top of this PRs commit. My goals:
You can find my branch here: master...twalthr:FLINK-6617 |
|
Hi @twalthr and @sunjincheng121, I looked over the package structure and naming of the tests and this looks good to me. +1 to merge from my side. |
|
Merging... |

In this PR. I had make some changes as follows:
validationfolder for steam which keep consistent with batch.General
Documentation
Tests & Build
mvn clean verifyhas been executed successfully locally or a Travis build has passed