Skip to content
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 tempView may be unresolved when applying timestamp to plan #690

Merged
merged 2 commits into from
Apr 30, 2019

Conversation

birdstorm
Copy link
Contributor

No description provided.

)(sqlContext)
// Use SubqueryAlias so that projects and joins can correctly resolve
// UnresolvedAttributes in JoinConditions, Projects, Filters, etc.
SubqueryAlias(tableName, LogicalRelation(tiDBRelation))
}

protected def resolveRelations(ts: TiTimestamp): PartialFunction[LogicalPlan, LogicalPlan] = {
protected def resolveTiDBRelations: PartialFunction[LogicalPlan, LogicalPlan] = {
case i @ InsertIntoTable(UnresolvedRelation(tableIdentifier), _, _, _, _)
Copy link
Contributor Author

@birdstorm birdstorm Apr 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move InsertIntoTable up to keep same style as ResolveRelations.apply

println(df.queryExecution.analyzed)
df.queryExecution.analyzed.foreach { checkTimestamp }
df.explain
println(df.queryExecution.executedPlan)
Copy link
Contributor Author

@birdstorm birdstorm Apr 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StartTs will be added after Strategies are applied.

@@ -823,6 +823,7 @@ public String toString() {
sb.append(", Limit: ");
sb.append("[").append(limit).append("]");
}
sb.append(", startTs: ").append(startTs.getVersion());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a startTs information in TiDagRequest output. Not really sure if it is useful? @zhexuany

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is better to print it out.

@birdstorm
Copy link
Contributor Author

/run-all-tests

@birdstorm birdstorm changed the title Fix tempView may be not resolved when applying timestamp to plan Fix tempView may be unresolved when applying timestamp to plan Apr 30, 2019
@birdstorm
Copy link
Contributor Author

/run-all-tests profile=spark-2.4

Copy link
Contributor

@zhexuany zhexuany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants