-
Notifications
You must be signed in to change notification settings - Fork 244
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
fix view #1174
fix view #1174
Conversation
/run-all-tests |
@@ -4,23 +4,29 @@ class ViewTestSuite extends BaseTiSparkTest { | |||
private val table = "test_view" | |||
|
|||
test("Test View") { | |||
tidbStmt.execute(s"drop table if exists $table") |
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.
what if there's some dirty data (e.g. a table named test_view
) in database?
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.
afterAll will drop it.
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.
but we should still drop it before each 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.
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.
Is it partitionTableSuite? If you take a look at afterAll
, you will find that table t
is not dropped at afterAll
.
try { | ||
tidbStmt.execute("drop view if exists v") |
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.
what if there's some dirty data (e.g. a view named v
) in database?
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.
afterAll will drop it.
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.
LGTM
@birdstorm would u please add more information to the commit message? |
What problem does this PR solve?
This PR fixes TiSpark cannot parse view table's json.
What is changed and how it works?
ViewCols could be null. If such case happens, we do not need parse viewCols.
Tests